Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Editor] Add missing virtual bind to EditorNode3DGizmo(Plugin) #86881

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/classes/EditorNode3DGizmo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
<tutorials>
</tutorials>
<methods>
<method name="_begin_handle_action" qualifiers="virtual">
<return type="void" />
<param index="0" name="id" type="int" />
<param index="1" name="secondary" type="bool" />
<description>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would appreciate any details on what this should do, as I don't know what it does, the base method isn't exposed so no information is available

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @KoBeWi who added this AFAICT.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added in #71092
It's called when a user clicks the gizmo and can be used to fetch and store initial values.

</description>
</method>
<method name="_commit_handle" qualifiers="virtual">
<return type="void" />
<param index="0" name="id" type="int" />
Expand Down
8 changes: 8 additions & 0 deletions doc/classes/EditorNode3DGizmoPlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
<link title="Node3D gizmo plugins">$DOCS_URL/tutorials/plugins/editor/3d_gizmos.html</link>
</tutorials>
<methods>
<method name="_begin_handle_action" qualifiers="virtual">
<return type="void" />
<param index="0" name="gizmo" type="EditorNode3DGizmo" />
<param index="1" name="handle_id" type="int" />
<param index="2" name="secondary" type="bool" />
<description>
</description>
</method>
<method name="_can_be_hidden" qualifiers="virtual const">
<return type="bool" />
<description>
Expand Down
2 changes: 2 additions & 0 deletions editor/plugins/node_3d_editor_gizmos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ void EditorNode3DGizmo::_bind_methods() {
GDVIRTUAL_BIND(_is_handle_highlighted, "id", "secondary");

GDVIRTUAL_BIND(_get_handle_value, "id", "secondary");
GDVIRTUAL_BIND(_begin_handle_action, "id", "secondary");
GDVIRTUAL_BIND(_set_handle, "id", "secondary", "camera", "point");
GDVIRTUAL_BIND(_commit_handle, "id", "secondary", "restore", "cancel");

Expand Down Expand Up @@ -1045,6 +1046,7 @@ void EditorNode3DGizmoPlugin::_bind_methods() {
GDVIRTUAL_BIND(_is_handle_highlighted, "gizmo", "handle_id", "secondary");
GDVIRTUAL_BIND(_get_handle_value, "gizmo", "handle_id", "secondary");

GDVIRTUAL_BIND(_begin_handle_action, "gizmo", "handle_id", "secondary");
GDVIRTUAL_BIND(_set_handle, "gizmo", "handle_id", "secondary", "camera", "screen_pos");
GDVIRTUAL_BIND(_commit_handle, "gizmo", "handle_id", "secondary", "restore", "cancel");

Expand Down
Loading