summaryrefslogtreecommitdiff
path: root/doc/classes/EditorNode3DGizmo.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/EditorNode3DGizmo.xml')
-rw-r--r--doc/classes/EditorNode3DGizmo.xml26
1 files changed, 18 insertions, 8 deletions
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index c804bb70e0..2eec5310dc 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorNode3DGizmo" inherits="Node3DGizmo" version="4.0">
+<class name="EditorNode3DGizmo" inherits="Node3DGizmo" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Gizmo for editing Node3D objects.
</brief_description>
@@ -12,11 +12,13 @@
<method name="_commit_handle" qualifiers="virtual">
<return type="void" />
<argument index="0" name="id" type="int" />
- <argument index="1" name="restore" type="Variant" />
- <argument index="2" name="cancel" type="bool" />
+ <argument index="1" name="secondary" type="bool" />
+ <argument index="2" name="restore" type="Variant" />
+ <argument index="3" name="cancel" type="bool" />
<description>
Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo".
If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action.
+ The [code]secondary[/code] argument is [code]true[/code] when the committed handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_commit_subgizmos" qualifiers="virtual">
@@ -32,16 +34,19 @@
<method name="_get_handle_name" qualifiers="virtual const">
<return type="String" />
<argument index="0" name="id" type="int" />
+ <argument index="1" name="secondary" type="bool" />
<description>
- Override this method to return the name of an edited handle (handles must have been previously added by [method add_handles]).
- Handles can be named for reference to the user when editing.
+ Override this method to return the name of an edited handle (handles must have been previously added by [method add_handles]). Handles can be named for reference to the user when editing.
+ The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_get_handle_value" qualifiers="virtual const">
<return type="Variant" />
<argument index="0" name="id" type="int" />
+ <argument index="1" name="secondary" type="bool" />
<description>
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 [code]restore[/code] argument in [method _commit_handle].
+ The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_get_subgizmo_transform" qualifiers="virtual const">
@@ -54,8 +59,10 @@
<method name="_is_handle_highlighted" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="id" type="int" />
+ <argument index="1" name="secondary" type="bool" />
<description>
Override this method to return [code]true[/code] whenever the given handle should be highlighted in the editor.
+ The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_redraw" qualifiers="virtual">
@@ -67,10 +74,12 @@
<method name="_set_handle" qualifiers="virtual">
<return type="void" />
<argument index="0" name="id" type="int" />
- <argument index="1" name="camera" type="Camera3D" />
- <argument index="2" name="point" type="Vector2" />
+ <argument index="1" name="secondary" type="bool" />
+ <argument index="2" name="camera" type="Camera3D" />
+ <argument index="3" name="point" type="Vector2" />
<description>
Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts.
+ The [code]secondary[/code] argument is [code]true[/code] when the edited handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_set_subgizmo_transform" qualifiers="virtual">
@@ -120,6 +129,7 @@
<argument index="4" name="secondary" type="bool" default="false" />
<description>
Adds a list of handles (points) which can be used to edit the properties of the gizmo's Node3D. The [code]ids[/code] argument can be used to specify a custom identifier for each handle, if an empty [code]Array[/code] is passed, the ids will be assigned automatically from the [code]handles[/code] argument order.
+ The [code]secondary[/code] argument marks the added handles as secondary, meaning they will normally have less 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.
There are virtual methods which will be called upon editing of these handles. Call this method during [method _redraw].
</description>
</method>
@@ -135,7 +145,7 @@
</method>
<method name="add_mesh">
<return type="void" />
- <argument index="0" name="mesh" type="ArrayMesh" />
+ <argument index="0" name="mesh" type="Mesh" />
<argument index="1" name="material" type="Material" default="null" />
<argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" />
<argument index="3" name="skeleton" type="SkinReference" default="null" />