class_editornode3dgizmoplugin.rst 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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/EditorNode3DGizmoPlugin.xml.
  6. .. _class_EditorNode3DGizmoPlugin:
  7. EditorNode3DGizmoPlugin
  8. =======================
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A class used by the editor to define Node3D gizmo types.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **EditorNode3DGizmoPlugin** allows you to define a new type of Gizmo. There are two main ways to do so: extending **EditorNode3DGizmoPlugin** for the simpler gizmos, or creating a new :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` type. See the tutorial in the documentation for more info.
  15. To use **EditorNode3DGizmoPlugin**, register it using the :ref:`EditorPlugin.add_node_3d_gizmo_plugin<class_EditorPlugin_method_add_node_3d_gizmo_plugin>` method first.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Node3D gizmo plugins <../tutorials/plugins/editor/3d_gizmos>`
  20. .. rst-class:: classref-reftable-group
  21. Methods
  22. -------
  23. .. table::
  24. :widths: auto
  25. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`_can_be_hidden<class_EditorNode3DGizmoPlugin_private_method__can_be_hidden>` **(** **)** |virtual| |const| |
  27. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`_commit_handle<class_EditorNode3DGizmoPlugin_private_method__commit_handle>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary, :ref:`Variant<class_Variant>` restore, :ref:`bool<class_bool>` cancel **)** |virtual| |
  29. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`Transform3D[]<class_Transform3D>` restores, :ref:`bool<class_bool>` cancel **)** |virtual| |
  31. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` | :ref:`_create_gizmo<class_EditorNode3DGizmoPlugin_private_method__create_gizmo>` **(** :ref:`Node3D<class_Node3D>` for_node_3d **)** |virtual| |const| |
  33. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`String<class_String>` | :ref:`_get_gizmo_name<class_EditorNode3DGizmoPlugin_private_method__get_gizmo_name>` **(** **)** |virtual| |const| |
  35. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`String<class_String>` | :ref:`_get_handle_name<class_EditorNode3DGizmoPlugin_private_method__get_handle_name>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| |
  37. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`Variant<class_Variant>` | :ref:`_get_handle_value<class_EditorNode3DGizmoPlugin_private_method__get_handle_value>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| |
  39. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`int<class_int>` | :ref:`_get_priority<class_EditorNode3DGizmoPlugin_private_method__get_priority>` **(** **)** |virtual| |const| |
  41. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_subgizmo_transform<class_EditorNode3DGizmoPlugin_private_method__get_subgizmo_transform>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` subgizmo_id **)** |virtual| |const| |
  43. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`_has_gizmo<class_EditorNode3DGizmoPlugin_private_method__has_gizmo>` **(** :ref:`Node3D<class_Node3D>` for_node_3d **)** |virtual| |const| |
  45. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`bool<class_bool>` | :ref:`_is_handle_highlighted<class_EditorNode3DGizmoPlugin_private_method__is_handle_highlighted>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| |
  47. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`_is_selectable_when_hidden<class_EditorNode3DGizmoPlugin_private_method__is_selectable_when_hidden>` **(** **)** |virtual| |const| |
  49. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | void | :ref:`_redraw<class_EditorNode3DGizmoPlugin_private_method__redraw>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo **)** |virtual| |
  51. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | void | :ref:`_set_handle<class_EditorNode3DGizmoPlugin_private_method__set_handle>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` screen_pos **)** |virtual| |
  53. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | void | :ref:`_set_subgizmo_transform<class_EditorNode3DGizmoPlugin_private_method__set_subgizmo_transform>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` subgizmo_id, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| |
  55. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_frustum>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Plane[]<class_Plane>` frustum_planes **)** |virtual| |const| |
  57. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` screen_pos **)** |virtual| |const| |
  59. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | void | :ref:`add_material<class_EditorNode3DGizmoPlugin_method_add_material>` **(** :ref:`String<class_String>` name, :ref:`StandardMaterial3D<class_StandardMaterial3D>` material **)** |
  61. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | void | :ref:`create_handle_material<class_EditorNode3DGizmoPlugin_method_create_handle_material>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` billboard=false, :ref:`Texture2D<class_Texture2D>` texture=null **)** |
  63. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | void | :ref:`create_icon_material<class_EditorNode3DGizmoPlugin_method_create_icon_material>` **(** :ref:`String<class_String>` name, :ref:`Texture2D<class_Texture2D>` texture, :ref:`bool<class_bool>` on_top=false, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |
  65. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | void | :ref:`create_material<class_EditorNode3DGizmoPlugin_method_create_material>` **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` billboard=false, :ref:`bool<class_bool>` on_top=false, :ref:`bool<class_bool>` use_vertex_color=false **)** |
  67. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`StandardMaterial3D<class_StandardMaterial3D>` | :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>` **(** :ref:`String<class_String>` name, :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo=null **)** |
  69. +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. .. rst-class:: classref-section-separator
  71. ----
  72. .. rst-class:: classref-descriptions-group
  73. Method Descriptions
  74. -------------------
  75. .. _class_EditorNode3DGizmoPlugin_private_method__can_be_hidden:
  76. .. rst-class:: classref-method
  77. :ref:`bool<class_bool>` **_can_be_hidden** **(** **)** |virtual| |const|
  78. Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns ``true`` if not overridden.
  79. .. rst-class:: classref-item-separator
  80. ----
  81. .. _class_EditorNode3DGizmoPlugin_private_method__commit_handle:
  82. .. rst-class:: classref-method
  83. void **_commit_handle** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary, :ref:`Variant<class_Variant>` restore, :ref:`bool<class_bool>` cancel **)** |virtual|
  84. Override this method to commit a handle being edited (handles must have been previously added by :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` during :ref:`_redraw<class_EditorNode3DGizmoPlugin_private_method__redraw>`). 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".
  85. If the ``cancel`` argument is ``true``, the ``restore`` value should be directly set, without any :ref:`UndoRedo<class_UndoRedo>` action.
  86. The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information).
  87. Called for this plugin's active gizmos.
  88. .. rst-class:: classref-item-separator
  89. ----
  90. .. _class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos:
  91. .. rst-class:: classref-method
  92. void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`Transform3D[]<class_Transform3D>` restores, :ref:`bool<class_bool>` cancel **)** |virtual|
  93. Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmoPlugin_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".
  94. If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo<class_UndoRedo>` action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos.
  95. .. rst-class:: classref-item-separator
  96. ----
  97. .. _class_EditorNode3DGizmoPlugin_private_method__create_gizmo:
  98. .. rst-class:: classref-method
  99. :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` **_create_gizmo** **(** :ref:`Node3D<class_Node3D>` for_node_3d **)** |virtual| |const|
  100. Override this method to return a custom :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` for the spatial nodes of your choice, return ``null`` for the rest of nodes. See also :ref:`_has_gizmo<class_EditorNode3DGizmoPlugin_private_method__has_gizmo>`.
  101. .. rst-class:: classref-item-separator
  102. ----
  103. .. _class_EditorNode3DGizmoPlugin_private_method__get_gizmo_name:
  104. .. rst-class:: classref-method
  105. :ref:`String<class_String>` **_get_gizmo_name** **(** **)** |virtual| |const|
  106. Override this method to provide the name that will appear in the gizmo visibility menu.
  107. .. rst-class:: classref-item-separator
  108. ----
  109. .. _class_EditorNode3DGizmoPlugin_private_method__get_handle_name:
  110. .. rst-class:: classref-method
  111. :ref:`String<class_String>` **_get_handle_name** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const|
  112. Override this method to provide gizmo's handle names. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information). Called for this plugin's active gizmos.
  113. .. rst-class:: classref-item-separator
  114. ----
  115. .. _class_EditorNode3DGizmoPlugin_private_method__get_handle_value:
  116. .. rst-class:: classref-method
  117. :ref:`Variant<class_Variant>` **_get_handle_value** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const|
  118. 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_EditorNode3DGizmoPlugin_private_method__commit_handle>`.
  119. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information).
  120. Called for this plugin's active gizmos.
  121. .. rst-class:: classref-item-separator
  122. ----
  123. .. _class_EditorNode3DGizmoPlugin_private_method__get_priority:
  124. .. rst-class:: classref-method
  125. :ref:`int<class_int>` **_get_priority** **(** **)** |virtual| |const|
  126. Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection.
  127. All built-in editor gizmos return a priority of ``-1``. If not overridden, this method will return ``0``, which means custom gizmos will automatically get higher priority than built-in gizmos.
  128. .. rst-class:: classref-item-separator
  129. ----
  130. .. _class_EditorNode3DGizmoPlugin_private_method__get_subgizmo_transform:
  131. .. rst-class:: classref-method
  132. :ref:`Transform3D<class_Transform3D>` **_get_subgizmo_transform** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` subgizmo_id **)** |virtual| |const|
  133. Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the ``restore`` argument in :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos>`. Called for this plugin's active gizmos.
  134. .. rst-class:: classref-item-separator
  135. ----
  136. .. _class_EditorNode3DGizmoPlugin_private_method__has_gizmo:
  137. .. rst-class:: classref-method
  138. :ref:`bool<class_bool>` **_has_gizmo** **(** :ref:`Node3D<class_Node3D>` for_node_3d **)** |virtual| |const|
  139. Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a :ref:`Node3D<class_Node3D>` node is added to a scene this method is called, if it returns ``true`` the node gets a generic :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` assigned and is added to this plugin's list of active gizmos.
  140. .. rst-class:: classref-item-separator
  141. ----
  142. .. _class_EditorNode3DGizmoPlugin_private_method__is_handle_highlighted:
  143. .. rst-class:: classref-method
  144. :ref:`bool<class_bool>` **_is_handle_highlighted** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const|
  145. Override this method to return ``true`` whenever to given handle should be highlighted in the editor. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information). Called for this plugin's active gizmos.
  146. .. rst-class:: classref-item-separator
  147. ----
  148. .. _class_EditorNode3DGizmoPlugin_private_method__is_selectable_when_hidden:
  149. .. rst-class:: classref-method
  150. :ref:`bool<class_bool>` **_is_selectable_when_hidden** **(** **)** |virtual| |const|
  151. Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden.
  152. .. rst-class:: classref-item-separator
  153. ----
  154. .. _class_EditorNode3DGizmoPlugin_private_method__redraw:
  155. .. rst-class:: classref-method
  156. void **_redraw** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo **)** |virtual|
  157. Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`EditorNode3DGizmo.clear<class_EditorNode3DGizmo_method_clear>` at the beginning of this method and then add visual elements depending on the node's properties.
  158. .. rst-class:: classref-item-separator
  159. ----
  160. .. _class_EditorNode3DGizmoPlugin_private_method__set_handle:
  161. .. rst-class:: classref-method
  162. void **_set_handle** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` screen_pos **)** |virtual|
  163. Override this method to update the node's properties when the user drags a gizmo handle (previously added with :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>`). The provided ``screen_pos`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts.
  164. The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information).
  165. Called for this plugin's active gizmos.
  166. .. rst-class:: classref-item-separator
  167. ----
  168. .. _class_EditorNode3DGizmoPlugin_private_method__set_subgizmo_transform:
  169. .. rst-class:: classref-method
  170. void **_set_subgizmo_transform** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` subgizmo_id, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual|
  171. Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_frustum>`). The ``transform`` is given in the Node3D's local coordinate system. Called for this plugin's active gizmos.
  172. .. rst-class:: classref-item-separator
  173. ----
  174. .. _class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_frustum:
  175. .. rst-class:: classref-method
  176. :ref:`PackedInt32Array<class_PackedInt32Array>` **_subgizmos_intersect_frustum** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Plane[]<class_Plane>` frustum_planes **)** |virtual| |const|
  177. Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and ``frustum_planes``, this method should return which subgizmos are contained within the frustums. The ``frustum_planes`` 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, these identifiers can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmoPlugin_private_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos>`. Called for this plugin's active gizmos.
  178. .. rst-class:: classref-item-separator
  179. ----
  180. .. _class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray:
  181. .. rst-class:: classref-method
  182. :ref:`int<class_int>` **_subgizmos_intersect_ray** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` screen_pos **)** |virtual| |const|
  183. Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``screen_pos`` 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_EditorNode3DGizmoPlugin_private_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos>`. Called for this plugin's active gizmos.
  184. .. rst-class:: classref-item-separator
  185. ----
  186. .. _class_EditorNode3DGizmoPlugin_method_add_material:
  187. .. rst-class:: classref-method
  188. void **add_material** **(** :ref:`String<class_String>` name, :ref:`StandardMaterial3D<class_StandardMaterial3D>` material **)**
  189. Adds a new material to the internal material list for the plugin. It can then be accessed with :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>`. Should not be overridden.
  190. .. rst-class:: classref-item-separator
  191. ----
  192. .. _class_EditorNode3DGizmoPlugin_method_create_handle_material:
  193. .. rst-class:: classref-method
  194. void **create_handle_material** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` billboard=false, :ref:`Texture2D<class_Texture2D>` texture=null **)**
  195. Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>` and used in :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>`. Should not be overridden.
  196. You can optionally provide a texture to use instead of the default icon.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_EditorNode3DGizmoPlugin_method_create_icon_material:
  200. .. rst-class:: classref-method
  201. void **create_icon_material** **(** :ref:`String<class_String>` name, :ref:`Texture2D<class_Texture2D>` texture, :ref:`bool<class_bool>` on_top=false, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)**
  202. Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>` and used in :ref:`EditorNode3DGizmo.add_unscaled_billboard<class_EditorNode3DGizmo_method_add_unscaled_billboard>`. Should not be overridden.
  203. .. rst-class:: classref-item-separator
  204. ----
  205. .. _class_EditorNode3DGizmoPlugin_method_create_material:
  206. .. rst-class:: classref-method
  207. void **create_material** **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` billboard=false, :ref:`bool<class_bool>` on_top=false, :ref:`bool<class_bool>` use_vertex_color=false **)**
  208. Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>` and used in :ref:`EditorNode3DGizmo.add_mesh<class_EditorNode3DGizmo_method_add_mesh>` and :ref:`EditorNode3DGizmo.add_lines<class_EditorNode3DGizmo_method_add_lines>`. Should not be overridden.
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_EditorNode3DGizmoPlugin_method_get_material:
  212. .. rst-class:: classref-method
  213. :ref:`StandardMaterial3D<class_StandardMaterial3D>` **get_material** **(** :ref:`String<class_String>` name, :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo=null **)**
  214. Gets material from the internal list of materials. If an :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` is provided, it will try to get the corresponding variant (selected and/or editable).
  215. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  216. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  217. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  218. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  219. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  220. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  221. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`