Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2013-04-15 18:55:36 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-04-15 18:55:36 +0400
commitfaaa7395800dfdf65510b07b9cf6e424dcb4ed45 (patch)
tree73bdf73f757a020b5a45e709d3e4c610c345ec28 /source/blender/editors/sculpt_paint
parent91ee88dfd0a0793708a4746690d3e01d3a5c1802 (diff)
WIP, jason's patch
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 2be5d62c105..debb1c5a981 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -457,6 +457,15 @@ bool paint_space_stroke_enabled(Brush *br, PaintMode mode)
return (br->flag & BRUSH_SPACE) && paint_supports_dynamic_size(br, mode);
}
+static bool sculpt_is_grab_tool(Brush *br)
+{
+ return ELEM4(br->sculpt_tool,
+ SCULPT_TOOL_GRAB,
+ SCULPT_TOOL_THUMB,
+ SCULPT_TOOL_ROTATE,
+ SCULPT_TOOL_SNAKE_HOOK);
+}
+
/* return true if the brush size can change during paint (normally used for pressure) */
bool paint_supports_dynamic_size(Brush *br, PaintMode mode)
{
@@ -465,14 +474,8 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode)
switch (mode) {
case PAINT_SCULPT:
- if (ELEM4(br->sculpt_tool,
- SCULPT_TOOL_GRAB,
- SCULPT_TOOL_THUMB,
- SCULPT_TOOL_ROTATE,
- SCULPT_TOOL_SNAKE_HOOK))
- {
+ if (sculpt_is_grab_tool(br))
return false;
- }
default:
;
}
@@ -490,14 +493,8 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
switch (mode) {
case PAINT_SCULPT:
- if (ELEM4(br->sculpt_tool,
- SCULPT_TOOL_GRAB,
- SCULPT_TOOL_THUMB,
- SCULPT_TOOL_ROTATE,
- SCULPT_TOOL_SNAKE_HOOK))
- {
+ if (sculpt_is_grab_tool(br))
return false;
- }
default:
;
}
@@ -512,7 +509,7 @@ bool paint_supports_dynamic_tex_coords(Brush *br, PaintMode mode)
switch (mode) {
case PAINT_SCULPT:
- if (ELEM4(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SNAKE_HOOK))
+ if (sculpt_is_grab_tool(br))
return false;
default:
;