From 02ada0d0643a216fa6dff7d46166d1276e18a320 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 30 Sep 2024 15:43:20 +0200 Subject: [PATCH] Geometry Nodes: use shorter linear gizmo when using box shape This solves an issue when both linear gizmos happen to be at the same position. In this case the gizmos became fairly unusable because they overlapped a lot. They can still overlap of course, but it's more likely that they start at the same position than that they end at the same position. Note, when using a transform gizmo, the collision between the scale and translate gizmo is resolved already. The issue only happens when two independent Linear Gizmo nodes are used. Pull Request: https://projects.blender.org/blender/blender/pulls/128371 --- .../editors/space_view3d/view3d_gizmo_geometry_nodes.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/editors/space_view3d/view3d_gizmo_geometry_nodes.cc b/source/blender/editors/space_view3d/view3d_gizmo_geometry_nodes.cc index 01179c4e272..94700d23137 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_geometry_nodes.cc +++ b/source/blender/editors/space_view3d/view3d_gizmo_geometry_nodes.cc @@ -236,6 +236,10 @@ class LinearGizmo : public NodeGizmos { WM_gizmo_set_line_width(gizmo_, 1.0f); + const float length = (storage.draw_style == GEO_NODE_LINEAR_GIZMO_DRAW_STYLE_BOX) ? 0.8f : + 1.0f; + RNA_float_set(gizmo_->ptr, "length", length); + const ThemeColorID color_theme_id = get_gizmo_theme_color_id( GeometryNodeGizmoColor(storage.color_id)); UI_GetThemeColor3fv(color_theme_id, gizmo_->color);