From d05a07235c31d7c727d55cea0f773811287f9a8a Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Fri, 17 Jul 2020 14:45:54 -0400 Subject: [PATCH] Fix bound return type on get_priority. Also adds a description explaining gizmo priority. Inferred from: https://github.com/rcorre/godot/blob/e4363d001afd3e94e1c02f8af9291087dab7408e/editor/plugins/spatial_editor_plugin.cpp#L5867-L5880 https://github.com/rcorre/godot/blob/e4363d001afd3e94e1c02f8af9291087dab7408e/editor/plugins/spatial_editor_plugin.cpp#L6462-L6470 (cherry picked from commit c6919a13da8e6b019be49aae9a7f0ebb28ef2c5e) --- doc/classes/EditorSpatialGizmoPlugin.xml | 2 +- editor/plugins/spatial_editor_plugin.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml index c9494cf78f4..864b1cc5f29 100644 --- a/doc/classes/EditorSpatialGizmoPlugin.xml +++ b/doc/classes/EditorSpatialGizmoPlugin.xml @@ -136,7 +136,7 @@ - + Override this method to set the gizmo's priority. Higher values correspond to higher priority. If a gizmo with higher priority conflicts with another gizmo, only the gizmo with higher priority will be used. diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 8b2766a4a95..b825c5796c6 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -6624,7 +6624,7 @@ void EditorSpatialGizmoPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("get_material", "name", "gizmo"), &EditorSpatialGizmoPlugin::get_material); //, DEFVAL(Ref())); BIND_VMETHOD(MethodInfo(Variant::STRING, "get_name")); - BIND_VMETHOD(MethodInfo(Variant::STRING, "get_priority")); + BIND_VMETHOD(MethodInfo(Variant::INT, "get_priority")); BIND_VMETHOD(MethodInfo(Variant::BOOL, "can_be_hidden")); BIND_VMETHOD(MethodInfo(Variant::BOOL, "is_selectable_when_hidden"));