diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml index ce8cfdf97b4b..fd25f3f79a94 100644 --- a/doc/classes/EditorNode3DGizmo.xml +++ b/doc/classes/EditorNode3DGizmo.xml @@ -193,6 +193,12 @@ Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during [method _redraw]. + + + + Returns [code]true[/code] if this gizmo is currently selected. Can be used to write custom visualization logic during [method _redraw]. + + diff --git a/editor/scene/3d/node_3d_editor_gizmos.cpp b/editor/scene/3d/node_3d_editor_gizmos.cpp index 7c90353bcb6b..ad3b9e74b2e6 100644 --- a/editor/scene/3d/node_3d_editor_gizmos.cpp +++ b/editor/scene/3d/node_3d_editor_gizmos.cpp @@ -863,6 +863,7 @@ void EditorNode3DGizmo::_bind_methods() { ClassDB::bind_method(D_METHOD("set_hidden", "hidden"), &EditorNode3DGizmo::set_hidden); ClassDB::bind_method(D_METHOD("is_subgizmo_selected", "id"), &EditorNode3DGizmo::is_subgizmo_selected); ClassDB::bind_method(D_METHOD("get_subgizmo_selection"), &EditorNode3DGizmo::get_subgizmo_selection); + ClassDB::bind_method(D_METHOD("is_selected"), &EditorNode3DGizmo::is_selected); GDVIRTUAL_BIND(_redraw); GDVIRTUAL_BIND(_get_handle_name, "id", "secondary");