[Bf-blender-cvs] [441dd08dba3] master: Expose option for fallback tools keymap in GizmoGroup type

jon denning noreply at git.blender.org
Wed Jul 13 14:30:28 CEST 2022


Commit: 441dd08dba34d22e8a34d54b252e8cdd38f2c56c
Author: jon denning
Date:   Wed Jul 13 08:30:40 2022 -0400
Branches: master
https://developer.blender.org/rB441dd08dba34d22e8a34d54b252e8cdd38f2c56c

Expose option for fallback tools keymap in GizmoGroup type

This patch allows new GizmoGroup classes to support tool fallback keymap.

With this patch, when new gizmo groups add `'TOOL_FALLBACK_KEYMAP'` to
its `bl_options`, the fallback tools are added to the group. This
allows a `WorkSpaceTool` (for example) to have selection be a fallback
tool if the user LeftMouse drags away from other gizmos in the group.

Reviewed by: Campbell Barton (campbellbarton)

Differential Revision: https://developer.blender.org/D15154

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

M	source/blender/makesrna/intern/rna_wm_gizmo.c

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

diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c
index 6c3d96726bb..0e307f5b424 100644
--- a/source/blender/makesrna/intern/rna_wm_gizmo.c
+++ b/source/blender/makesrna/intern/rna_wm_gizmo.c
@@ -1398,6 +1398,11 @@ static void rna_def_gizmogroup(BlenderRNA *brna)
        0,
        "Tool Init",
        "Postpone running until tool operator run (when used with a tool)"},
+      {WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP,
+       "TOOL_FALLBACK_KEYMAP",
+       0,
+       "Use fallback tools keymap",
+       "Add fallback tools keymap to this gizmo type."},
       {WM_GIZMOGROUPTYPE_VR_REDRAWS,
        "VR_REDRAWS",
        0,



More information about the Bf-blender-cvs mailing list