From 62d98c6f02f52bf326630cf84541e3b2e1f8712a Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Sun, 17 Mar 2024 14:15:59 +0100 Subject: [PATCH] [Editor] Fix handle ID being passed for 3D Gizmo plugins --- editor/plugins/node_3d_editor_gizmos.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp index d4d918743da..8aff3c9aec3 100644 --- a/editor/plugins/node_3d_editor_gizmos.cpp +++ b/editor/plugins/node_3d_editor_gizmos.cpp @@ -431,12 +431,13 @@ void EditorNode3DGizmo::add_handles(const Vector &p_handles, const Ref< colors.resize(p_handles.size()); Color *w = colors.ptrw(); for (int i = 0; i < p_handles.size(); i++) { + int id = p_ids.is_empty() ? i : p_ids[i]; + Color col(1, 1, 1, 1); - if (is_handle_highlighted(i, p_secondary)) { + if (is_handle_highlighted(id, p_secondary)) { col = Color(0, 0, 1, 0.9); } - int id = p_ids.is_empty() ? i : p_ids[i]; if (!is_current_hover_gizmo || current_hover_handle != id || p_secondary != current_hover_handle_secondary) { col.a = 0.8; }