[Bf-blender-cvs] [2b32a2c3b21] master: Snap Gizmo: hide snap cursor if another gizmo is highlighted

Germano Cavalcante noreply at git.blender.org
Wed Jan 11 22:51:55 CET 2023


Commit: 2b32a2c3b2193ccfe9062efd842f35798fca0cd5
Author: Germano Cavalcante
Date:   Wed Jan 11 18:52:30 2023 -0300
Branches: master
https://developer.blender.org/rB2b32a2c3b2193ccfe9062efd842f35798fca0cd5

Snap Gizmo: hide snap cursor if another gizmo is highlighted

===================================================================

M	source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c

===================================================================

diff --git a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
index 8f2cb016f86..4a5bad575e7 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
@@ -242,6 +242,10 @@ static void snap_cursor_free(SnapGizmo3D *snap_gizmo)
 static bool snap_cursor_poll(ARegion *region, void *data)
 {
   SnapGizmo3D *snap_gizmo = (SnapGizmo3D *)data;
+  if (!(snap_gizmo->gizmo.state & WM_GIZMO_STATE_HIGHLIGHT)) {
+    return false;
+  }
+
   if (snap_gizmo->gizmo.flag & WM_GIZMO_HIDDEN) {
     snap_cursor_free(snap_gizmo);
     return false;



More information about the Bf-blender-cvs mailing list