diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-01 11:10:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-01 13:32:38 +0300 |
commit | 928becec60d16880838dd756cc8b6b5ee73f9b2d (patch) | |
tree | a54a8038c357c20d7b88a52d065b0f487480597d /source/blender/makesdna | |
parent | 5fd69f6bd8c91b73135d22b3cad829b0892dabca (diff) |
UV Sculpt: improve tool-system integration
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).
Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.
- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
select different brushes.
- Make UV sculpt use paint paint tool slots
(using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
S/P/G keys to switch tools.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_brush_types.h | 11 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index c5e9a0d6316..6f775e48d58 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -263,6 +263,8 @@ typedef struct Brush { /** Active sculpt tool. */ char sculpt_tool; + /** Active sculpt tool. */ + char uv_sculpt_tool; /** Active vertex paint. */ char vertexpaint_tool; /** Active weight paint. */ @@ -273,7 +275,7 @@ typedef struct Brush { char mask_tool; /** Active grease pencil tool. */ char gpencil_tool; - char _pad0[2]; + char _pad0[1]; float autosmooth_factor; @@ -437,6 +439,13 @@ typedef enum eBrushSculptTool { SCULPT_TOOL_MASK = 19, } eBrushSculptTool; +/* Brush.uv_sculpt_tool */ +typedef enum eBrushUVSculptTool { + UV_SCULPT_TOOL_GRAB = 0, + UV_SCULPT_TOOL_RELAX = 1, + UV_SCULPT_TOOL_PINCH = 2, +} eBrushUVSculptTool; + /** When #BRUSH_ACCUMULATE is used */ #define SCULPT_TOOL_HAS_ACCUMULATE(t) \ ELEM(t, \ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index a4f139110f1..79143ba8fb7 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -803,11 +803,6 @@ typedef struct RenderProfile { #define UV_SCULPT_LOCK_BORDERS 1 #define UV_SCULPT_ALL_ISLANDS 2 -/* ToolSettings.uv_sculpt_tool */ -#define UV_SCULPT_TOOL_PINCH 1 -#define UV_SCULPT_TOOL_RELAX 2 -#define UV_SCULPT_TOOL_GRAB 3 - /* ToolSettings.uv_relax_method */ #define UV_SCULPT_TOOL_RELAX_LAPLACIAN 1 #define UV_SCULPT_TOOL_RELAX_HC 2 @@ -1488,10 +1483,8 @@ typedef struct ToolSettings { char vgroupsubset; /* UV painting */ - char _pad2[1]; - char use_uv_sculpt; + char _pad2[3]; char uv_sculpt_settings; - char uv_sculpt_tool; char uv_relax_method; /* XXX: these sculpt_paint_* fields are deprecated, use the * unified_paint_settings field instead! */ |