Skip to content

Commit 2a45279

Browse files
committed
Expose EditorNode3DGizmo::is_selected
1 parent 3e4f548 commit 2a45279

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

doc/classes/EditorNode3DGizmo.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@
193193
Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during [method _redraw].
194194
</description>
195195
</method>
196+
<method name="is_selected" qualifiers="const">
197+
<return type="bool" />
198+
<description>
199+
Returns [code]true[/code] if this gizmo is currently selected. Can be used to write custom visualization logic during [method _redraw].
200+
</description>
201+
</method>
196202
<method name="is_subgizmo_selected" qualifiers="const">
197203
<return type="bool" />
198204
<param index="0" name="id" type="int" />

editor/scene/3d/node_3d_editor_gizmos.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,7 @@ void EditorNode3DGizmo::_bind_methods() {
863863
ClassDB::bind_method(D_METHOD("set_hidden", "hidden"), &EditorNode3DGizmo::set_hidden);
864864
ClassDB::bind_method(D_METHOD("is_subgizmo_selected", "id"), &EditorNode3DGizmo::is_subgizmo_selected);
865865
ClassDB::bind_method(D_METHOD("get_subgizmo_selection"), &EditorNode3DGizmo::get_subgizmo_selection);
866+
ClassDB::bind_method(D_METHOD("is_selected"), &EditorNode3DGizmo::is_selected);
866867

867868
GDVIRTUAL_BIND(_redraw);
868869
GDVIRTUAL_BIND(_get_handle_name, "id", "secondary");

0 commit comments

Comments
 (0)