diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-12-06 19:45:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-12-06 22:03:00 +0300 |
commit | 6ffcddc10afa07b073ce01c25884e23fc2b661df (patch) | |
tree | 86e7ddb017474083890bf16fac4876175a923e57 /source/blender/makesdna | |
parent | 7465078e637b729e8b36a4f4b73a50a347052df4 (diff) |
Tool System: experimental fallback tool support
Implement T66304 as an experimental option,
available under the preferences "Experimental" section.
- When enabled most tools in the 3D view have a gizmo.
- Dragging outside the gizmo uses the 'fallback' tool.
- The fallback tool can be changed or disabled in the tool options
or from a pie menu (Alt-W).
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 11 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 5 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_workspace_types.h | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 54ae38f608c..5336ea381c3 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1509,7 +1509,10 @@ typedef struct ToolSettings { /* XXX: these sculpt_paint_* fields are deprecated, use the * unified_paint_settings field instead! */ short sculpt_paint_settings DNA_DEPRECATED; - char _pad5[2]; + + char workspace_tool_type; + + char _pad5[1]; int sculpt_paint_unified_size DNA_DEPRECATED; float sculpt_paint_unified_unprojected_radius DNA_DEPRECATED; float sculpt_paint_unified_alpha DNA_DEPRECATED; @@ -2042,6 +2045,12 @@ enum { SCE_OBJECT_MODE_LOCK = (1 << 0), }; +/* ToolSettings.workspace_tool_flag */ +enum { + SCE_WORKSPACE_TOOL_FALLBACK = 0, + SCE_WORKSPACE_TOOL_DEFAULT = 1, +}; + /* ToolSettings.snap_flag */ #define SCE_SNAP (1 << 0) #define SCE_SNAP_ROTATE (1 << 1) diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index eb1b3036767..c26eb58a8f9 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -607,7 +607,10 @@ typedef struct UserDef_FileSpaceData { typedef struct UserDef_Experimental { /** #eUserPref_Experimental_Flag options. */ int flag; - char _pad0[4]; + + char use_tool_fallback; + + char _pad0[3]; } UserDef_Experimental; typedef struct UserDef { diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h index dbfb0cc6346..573b076542e 100644 --- a/source/blender/makesdna/DNA_workspace_types.h +++ b/source/blender/makesdna/DNA_workspace_types.h @@ -35,6 +35,10 @@ typedef struct bToolRef_Runtime { char gizmo_group[64]; char data_block[64]; + /** Optionally use these when not interacting directly with the primary tools gizmo. */ + char idname_fallback[64]; + char keymap_fallback[64]; + /** Use to infer primary operator to use when setting accelerator keys. */ char op[64]; |