diff options
Diffstat (limited to 'doc/classes/EditorSpatialGizmoPlugin.xml')
-rw-r--r-- | doc/classes/EditorSpatialGizmoPlugin.xml | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml index 521ec748b3..40d6376ca3 100644 --- a/doc/classes/EditorSpatialGizmoPlugin.xml +++ b/doc/classes/EditorSpatialGizmoPlugin.xml @@ -1,13 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorSpatialGizmoPlugin" inherits="Resource" category="Core" version="3.1"> +<class name="EditorSpatialGizmoPlugin" inherits="Resource" category="Core" version="3.2"> <brief_description> + Used by the editor to define Spatial gizmo types. </brief_description> <description> + EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorSpatialGizmoPlugin] for the simpler gizmos, or creating a new [EditorSpatialGizmo] type. See the tutorial in the documentation for more info. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link> </tutorials> - <demos> - </demos> <methods> <method name="add_material"> <return type="void"> @@ -17,12 +18,14 @@ <argument index="1" name="material" type="SpatialMaterial"> </argument> <description> + Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden. </description> </method> <method name="can_be_hidden" qualifiers="virtual"> <return type="bool"> </return> <description> + Override this method to define whether the gizmo can be hidden or not. Defaults to [code]true[/code]. </description> </method> <method name="commit_handle" qualifiers="virtual"> @@ -37,6 +40,7 @@ <argument index="3" name="cancel" type="bool" default="false"> </argument> <description> + Override this method to commit gizmo handles. Called for this plugin's active gizmos. </description> </method> <method name="create_gizmo" qualifiers="virtual"> @@ -45,6 +49,7 @@ <argument index="0" name="spatial" type="Spatial"> </argument> <description> + Override this method to return a custom [EditorSpatialGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. (See also [method has_gizmo]) </description> </method> <method name="create_handle_material"> @@ -55,6 +60,7 @@ <argument index="1" name="billboard" type="bool" default="false"> </argument> <description> + 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 [method get_material] and used in [method EditorSpatialGizmo.add_handles]. Should not be overridden. </description> </method> <method name="create_icon_material"> @@ -69,6 +75,7 @@ <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <description> + 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 [method get_material] and used in [method EditorSpatialGizmo.add_unscaled_billboard]. Should not be overridden. </description> </method> <method name="create_material"> @@ -85,6 +92,7 @@ <argument index="4" name="use_vertex_color" type="bool" default="false"> </argument> <description> + 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 [method get_material] and used in [method EditorSpatialGizmo.add_mesh] and [method EditorSpatialGizmo.add_lines]. Should not be overridden. </description> </method> <method name="get_handle_name" qualifiers="virtual"> @@ -95,6 +103,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Override this method to provide gizmo's handle names. Called for this plugin's active gizmos. </description> </method> <method name="get_handle_value" qualifiers="virtual"> @@ -105,6 +114,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Get actual value of a handle from gizmo. Called for this plugin's active gizmos. </description> </method> <method name="get_material"> @@ -115,12 +125,20 @@ <argument index="1" name="gizmo" type="EditorSpatialGizmo"> </argument> <description> + Get material from the internal list of materials. If an [EditorSpatialGizmo] is provided it will try to get the corresponding variant (selected and/or editable). </description> </method> <method name="get_name" qualifiers="virtual"> <return type="String"> </return> <description> + Override this method to provide the name that will appear in the gizmo visibility menu. + </description> + </method> + <method name="get_priority" qualifiers="virtual"> + <return type="String"> + </return> + <description> </description> </method> <method name="has_gizmo" qualifiers="virtual"> @@ -129,9 +147,10 @@ <argument index="0" name="spatial" type="Spatial"> </argument> <description> + Override this method to define which Spatial nodes have a gizmo from this plugin. Whenever a [Spatial] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorSpatialGizmo] assigned and is added to this plugin's list of active gizmos. </description> </method> - <method name="is_gizmo_handle_highlighted" qualifiers="virtual"> + <method name="is_handle_highlighted" qualifiers="virtual"> <return type="bool"> </return> <argument index="0" name="gizmo" type="EditorSpatialGizmo"> @@ -139,12 +158,14 @@ <argument index="1" name="index" type="int"> </argument> <description> + Get whether a handle is highlighted or not. Called for this plugin's active gizmos. </description> </method> <method name="is_selectable_when_hidden" qualifiers="virtual"> <return type="bool"> </return> <description> + Override this method to define whether Spatial with this gizmo should be selecteble even when the gizmo is hidden. </description> </method> <method name="redraw" qualifiers="virtual"> @@ -153,6 +174,7 @@ <argument index="0" name="gizmo" type="EditorSpatialGizmo"> </argument> <description> + Callback to redraw the provided gizmo. Called for this plugin's active gizmos. </description> </method> <method name="set_handle" qualifiers="virtual"> @@ -167,6 +189,7 @@ <argument index="3" name="point" type="Vector2"> </argument> <description> + Update the value of a handle after it has been updated. Called for this plugin's active gizmos. </description> </method> </methods> |