From a694cd7120c110d9965df582de4739024ee9fae4 Mon Sep 17 00:00:00 2001 From: landervr <31851431+CpnWaffle@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:52:11 +0100 Subject: [PATCH] Clean up UI of ReflectionProbe --- .../gizmos/reflection_probe_gizmo_plugin.cpp | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/editor/plugins/gizmos/reflection_probe_gizmo_plugin.cpp b/editor/plugins/gizmos/reflection_probe_gizmo_plugin.cpp index 85b84262f7c..d74c434410d 100644 --- a/editor/plugins/gizmos/reflection_probe_gizmo_plugin.cpp +++ b/editor/plugins/gizmos/reflection_probe_gizmo_plugin.cpp @@ -47,7 +47,7 @@ ReflectionProbeGizmoPlugin::ReflectionProbeGizmoPlugin() { gizmo_color.a = 0.5; create_material("reflection_internal_material", gizmo_color); - gizmo_color.a = 0.1; + gizmo_color.a = 0.025; create_material("reflection_probe_solid_material", gizmo_color); create_icon_material("reflection_probe_icon", EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GizmoReflectionProbe"), EditorStringName(EditorIcons))); @@ -165,22 +165,17 @@ void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { aabb.position = -size / 2; aabb.size = size; - for (int i = 0; i < 8; i++) { - Vector3 ep = aabb.get_endpoint(i); - internal_lines.push_back(probe->get_origin_offset()); - internal_lines.push_back(ep); - } - Vector handles = helper->box_get_handles(probe->get_size()); - for (int i = 0; i < 3; i++) { - Vector3 orig_handle = probe->get_origin_offset(); - orig_handle[i] -= 0.25; - lines.push_back(orig_handle); - handles.push_back(orig_handle); + if (probe->get_origin_offset() != Vector3(0.0, 0.0, 0.0)) { + for (int i = 0; i < 3; i++) { + Vector3 orig_handle = probe->get_origin_offset(); + orig_handle[i] -= 0.25; + lines.push_back(orig_handle); - orig_handle[i] += 0.5; - lines.push_back(orig_handle); + orig_handle[i] += 0.5; + lines.push_back(orig_handle); + } } Ref material = get_material("reflection_probe_material", p_gizmo);