class_editornode3dgizmo.rst 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorNode3DGizmo.xml.
  6. .. _class_EditorNode3DGizmo:
  7. EditorNode3DGizmo
  8. =================
  9. **Inherits:** :ref:`Node3DGizmo<class_Node3DGizmo>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Gizmo for editing :ref:`Node3D<class_Node3D>` objects.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Gizmo that is used for providing custom visualization and editing (handles and subgizmos) for :ref:`Node3D<class_Node3D>` objects. Can be overridden to create custom gizmos, but for simple gizmos creating a :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` is usually recommended.
  15. .. rst-class:: classref-reftable-group
  16. Methods
  17. -------
  18. .. table::
  19. :widths: auto
  20. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`_commit_handle<class_EditorNode3DGizmo_private_method__commit_handle>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary, :ref:`Variant<class_Variant>` restore, :ref:`bool<class_bool>` cancel **)** |virtual| |
  22. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`_commit_subgizmos<class_EditorNode3DGizmo_private_method__commit_subgizmos>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`Transform3D[]<class_Transform3D>` restores, :ref:`bool<class_bool>` cancel **)** |virtual| |
  24. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`String<class_String>` | :ref:`_get_handle_name<class_EditorNode3DGizmo_private_method__get_handle_name>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| |
  26. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`Variant<class_Variant>` | :ref:`_get_handle_value<class_EditorNode3DGizmo_private_method__get_handle_value>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| |
  28. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_subgizmo_transform<class_EditorNode3DGizmo_private_method__get_subgizmo_transform>` **(** :ref:`int<class_int>` id **)** |virtual| |const| |
  30. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`_is_handle_highlighted<class_EditorNode3DGizmo_private_method__is_handle_highlighted>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| |
  32. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>` **(** **)** |virtual| |
  34. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`_set_handle<class_EditorNode3DGizmo_private_method__set_handle>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` point **)** |virtual| |
  36. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`_set_subgizmo_transform<class_EditorNode3DGizmo_private_method__set_subgizmo_transform>` **(** :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| |
  38. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum>` **(** :ref:`Camera3D<class_Camera3D>` camera, :ref:`Plane[]<class_Plane>` frustum **)** |virtual| |const| |
  40. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`int<class_int>` | :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray>` **(** :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` point **)** |virtual| |const| |
  42. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`add_collision_segments<class_EditorNode3DGizmo_method_add_collision_segments>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` segments **)** |
  44. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`add_collision_triangles<class_EditorNode3DGizmo_method_add_collision_triangles>` **(** :ref:`TriangleMesh<class_TriangleMesh>` triangles **)** |
  46. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` handles, :ref:`Material<class_Material>` material, :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`bool<class_bool>` billboard=false, :ref:`bool<class_bool>` secondary=false **)** |
  48. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`add_lines<class_EditorNode3DGizmo_method_add_lines>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` lines, :ref:`Material<class_Material>` material, :ref:`bool<class_bool>` billboard=false, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** |
  50. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`add_mesh<class_EditorNode3DGizmo_method_add_mesh>` **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Material<class_Material>` material=null, :ref:`Transform3D<class_Transform3D>` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`SkinReference<class_SkinReference>` skeleton=null **)** |
  52. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`add_unscaled_billboard<class_EditorNode3DGizmo_method_add_unscaled_billboard>` **(** :ref:`Material<class_Material>` material, :ref:`float<class_float>` default_scale=1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** |
  54. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`clear<class_EditorNode3DGizmo_method_clear>` **(** **)** |
  56. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`Node3D<class_Node3D>` | :ref:`get_node_3d<class_EditorNode3DGizmo_method_get_node_3d>` **(** **)** |const| |
  58. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` | :ref:`get_plugin<class_EditorNode3DGizmo_method_get_plugin>` **(** **)** |const| |
  60. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_subgizmo_selection<class_EditorNode3DGizmo_method_get_subgizmo_selection>` **(** **)** |const| |
  62. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`bool<class_bool>` | :ref:`is_subgizmo_selected<class_EditorNode3DGizmo_method_is_subgizmo_selected>` **(** :ref:`int<class_int>` id **)** |const| |
  64. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | void | :ref:`set_hidden<class_EditorNode3DGizmo_method_set_hidden>` **(** :ref:`bool<class_bool>` hidden **)** |
  66. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`set_node_3d<class_EditorNode3DGizmo_method_set_node_3d>` **(** :ref:`Node<class_Node>` node **)** |
  68. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. .. rst-class:: classref-section-separator
  70. ----
  71. .. rst-class:: classref-descriptions-group
  72. Method Descriptions
  73. -------------------
  74. .. _class_EditorNode3DGizmo_private_method__commit_handle:
  75. .. rst-class:: classref-method
  76. void **_commit_handle** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary, :ref:`Variant<class_Variant>` restore, :ref:`bool<class_bool>` cancel **)** |virtual|
  77. Override this method to commit a handle being edited (handles must have been previously added by :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>`). This usually means creating an :ref:`UndoRedo<class_UndoRedo>` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo".
  78. If the ``cancel`` argument is ``true``, the ``restore`` value should be directly set, without any :ref:`UndoRedo<class_UndoRedo>` action.
  79. The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information).
  80. .. rst-class:: classref-item-separator
  81. ----
  82. .. _class_EditorNode3DGizmo_private_method__commit_subgizmos:
  83. .. rst-class:: classref-method
  84. void **_commit_subgizmos** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`Transform3D[]<class_Transform3D>` restores, :ref:`bool<class_bool>` cancel **)** |virtual|
  85. Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum>`). This usually means creating an :ref:`UndoRedo<class_UndoRedo>` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo".
  86. If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo<class_UndoRedo>` action.
  87. .. rst-class:: classref-item-separator
  88. ----
  89. .. _class_EditorNode3DGizmo_private_method__get_handle_name:
  90. .. rst-class:: classref-method
  91. :ref:`String<class_String>` **_get_handle_name** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const|
  92. Override this method to return the name of an edited handle (handles must have been previously added by :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>`). Handles can be named for reference to the user when editing.
  93. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information).
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_EditorNode3DGizmo_private_method__get_handle_value:
  97. .. rst-class:: classref-method
  98. :ref:`Variant<class_Variant>` **_get_handle_value** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const|
  99. Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle<class_EditorNode3DGizmo_private_method__commit_handle>`.
  100. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information).
  101. .. rst-class:: classref-item-separator
  102. ----
  103. .. _class_EditorNode3DGizmo_private_method__get_subgizmo_transform:
  104. .. rst-class:: classref-method
  105. :ref:`Transform3D<class_Transform3D>` **_get_subgizmo_transform** **(** :ref:`int<class_int>` id **)** |virtual| |const|
  106. Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_subgizmos<class_EditorNode3DGizmo_private_method__commit_subgizmos>`.
  107. .. rst-class:: classref-item-separator
  108. ----
  109. .. _class_EditorNode3DGizmo_private_method__is_handle_highlighted:
  110. .. rst-class:: classref-method
  111. :ref:`bool<class_bool>` **_is_handle_highlighted** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const|
  112. Override this method to return ``true`` whenever the given handle should be highlighted in the editor.
  113. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information).
  114. .. rst-class:: classref-item-separator
  115. ----
  116. .. _class_EditorNode3DGizmo_private_method__redraw:
  117. .. rst-class:: classref-method
  118. void **_redraw** **(** **)** |virtual|
  119. Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`clear<class_EditorNode3DGizmo_method_clear>` at the beginning of this method and then add visual elements depending on the node's properties.
  120. .. rst-class:: classref-item-separator
  121. ----
  122. .. _class_EditorNode3DGizmo_private_method__set_handle:
  123. .. rst-class:: classref-method
  124. void **_set_handle** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` point **)** |virtual|
  125. Override this method to update the node properties when the user drags a gizmo handle (previously added with :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>`). The provided ``point`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts.
  126. The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information).
  127. .. rst-class:: classref-item-separator
  128. ----
  129. .. _class_EditorNode3DGizmo_private_method__set_subgizmo_transform:
  130. .. rst-class:: classref-method
  131. void **_set_subgizmo_transform** **(** :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual|
  132. Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum>`). The ``transform`` is given in the :ref:`Node3D<class_Node3D>`'s local coordinate system.
  133. .. rst-class:: classref-item-separator
  134. ----
  135. .. _class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum:
  136. .. rst-class:: classref-method
  137. :ref:`PackedInt32Array<class_PackedInt32Array>` **_subgizmos_intersect_frustum** **(** :ref:`Camera3D<class_Camera3D>` camera, :ref:`Plane[]<class_Plane>` frustum **)** |virtual| |const|
  138. Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and a ``frustum``, this method should return which subgizmos are contained within the frustum. The ``frustum`` argument consists of an array with all the :ref:`Plane<class_Plane>`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmo_private_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmo_private_method__commit_subgizmos>`.
  139. .. rst-class:: classref-item-separator
  140. ----
  141. .. _class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray:
  142. .. rst-class:: classref-method
  143. :ref:`int<class_int>` **_subgizmos_intersect_ray** **(** :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` point **)** |virtual| |const|
  144. Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``point`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmo_private_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmo_private_method__commit_subgizmos>`.
  145. .. rst-class:: classref-item-separator
  146. ----
  147. .. _class_EditorNode3DGizmo_method_add_collision_segments:
  148. .. rst-class:: classref-method
  149. void **add_collision_segments** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` segments **)**
  150. Adds the specified ``segments`` to the gizmo's collision shape for picking. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`.
  151. .. rst-class:: classref-item-separator
  152. ----
  153. .. _class_EditorNode3DGizmo_method_add_collision_triangles:
  154. .. rst-class:: classref-method
  155. void **add_collision_triangles** **(** :ref:`TriangleMesh<class_TriangleMesh>` triangles **)**
  156. Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh<class_TriangleMesh>` can be generated from a regular :ref:`Mesh<class_Mesh>` too. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`.
  157. .. rst-class:: classref-item-separator
  158. ----
  159. .. _class_EditorNode3DGizmo_method_add_handles:
  160. .. rst-class:: classref-method
  161. void **add_handles** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` handles, :ref:`Material<class_Material>` material, :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`bool<class_bool>` billboard=false, :ref:`bool<class_bool>` secondary=false **)**
  162. Adds a list of handles (points) which can be used to edit the properties of the gizmo's :ref:`Node3D<class_Node3D>`. The ``ids`` argument can be used to specify a custom identifier for each handle, if an empty array is passed, the ids will be assigned automatically from the ``handles`` argument order.
  163. The ``secondary`` argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection.
  164. There are virtual methods which will be called upon editing of these handles. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`.
  165. .. rst-class:: classref-item-separator
  166. ----
  167. .. _class_EditorNode3DGizmo_method_add_lines:
  168. .. rst-class:: classref-method
  169. void **add_lines** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` lines, :ref:`Material<class_Material>` material, :ref:`bool<class_bool>` billboard=false, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)**
  170. Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`.
  171. .. rst-class:: classref-item-separator
  172. ----
  173. .. _class_EditorNode3DGizmo_method_add_mesh:
  174. .. rst-class:: classref-method
  175. void **add_mesh** **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Material<class_Material>` material=null, :ref:`Transform3D<class_Transform3D>` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`SkinReference<class_SkinReference>` skeleton=null **)**
  176. Adds a mesh to the gizmo with the specified ``material``, local ``transform`` and ``skeleton``. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`.
  177. .. rst-class:: classref-item-separator
  178. ----
  179. .. _class_EditorNode3DGizmo_method_add_unscaled_billboard:
  180. .. rst-class:: classref-method
  181. void **add_unscaled_billboard** **(** :ref:`Material<class_Material>` material, :ref:`float<class_float>` default_scale=1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)**
  182. Adds an unscaled billboard for visualization and selection. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`.
  183. .. rst-class:: classref-item-separator
  184. ----
  185. .. _class_EditorNode3DGizmo_method_clear:
  186. .. rst-class:: classref-method
  187. void **clear** **(** **)**
  188. Removes everything in the gizmo including meshes, collisions and handles.
  189. .. rst-class:: classref-item-separator
  190. ----
  191. .. _class_EditorNode3DGizmo_method_get_node_3d:
  192. .. rst-class:: classref-method
  193. :ref:`Node3D<class_Node3D>` **get_node_3d** **(** **)** |const|
  194. Returns the :ref:`Node3D<class_Node3D>` node associated with this gizmo.
  195. .. rst-class:: classref-item-separator
  196. ----
  197. .. _class_EditorNode3DGizmo_method_get_plugin:
  198. .. rst-class:: classref-method
  199. :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` **get_plugin** **(** **)** |const|
  200. Returns the :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` that owns this gizmo. It's useful to retrieve materials using :ref:`EditorNode3DGizmoPlugin.get_material<class_EditorNode3DGizmoPlugin_method_get_material>`.
  201. .. rst-class:: classref-item-separator
  202. ----
  203. .. _class_EditorNode3DGizmo_method_get_subgizmo_selection:
  204. .. rst-class:: classref-method
  205. :ref:`PackedInt32Array<class_PackedInt32Array>` **get_subgizmo_selection** **(** **)** |const|
  206. Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`.
  207. .. rst-class:: classref-item-separator
  208. ----
  209. .. _class_EditorNode3DGizmo_method_is_subgizmo_selected:
  210. .. rst-class:: classref-method
  211. :ref:`bool<class_bool>` **is_subgizmo_selected** **(** :ref:`int<class_int>` id **)** |const|
  212. Returns ``true`` if the given subgizmo is currently selected. Can be used to highlight selected elements during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`.
  213. .. rst-class:: classref-item-separator
  214. ----
  215. .. _class_EditorNode3DGizmo_method_set_hidden:
  216. .. rst-class:: classref-method
  217. void **set_hidden** **(** :ref:`bool<class_bool>` hidden **)**
  218. Sets the gizmo's hidden state. If ``true``, the gizmo will be hidden. If ``false``, it will be shown.
  219. .. rst-class:: classref-item-separator
  220. ----
  221. .. _class_EditorNode3DGizmo_method_set_node_3d:
  222. .. rst-class:: classref-method
  223. void **set_node_3d** **(** :ref:`Node<class_Node>` node **)**
  224. Sets the reference :ref:`Node3D<class_Node3D>` node for the gizmo. ``node`` must inherit from :ref:`Node3D<class_Node3D>`.
  225. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  226. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  227. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  228. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  229. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  230. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  231. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`