[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56061] trunk/blender/source/blender/ editors/sculpt_paint/paint_stroke.c: WIP, jason's patch

Antony Riakiotakis kalast at gmail.com
Mon Apr 15 16:55:36 CEST 2013


Revision: 56061
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56061
Author:   psy-fi
Date:     2013-04-15 14:55:36 +0000 (Mon, 15 Apr 2013)
Log Message:
-----------
WIP, jason's patch

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c	2013-04-15 12:04:55 UTC (rev 56060)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c	2013-04-15 14:55:36 UTC (rev 56061)
@@ -457,6 +457,15 @@
 	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 @@
 
 	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 @@
 
 	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 @@
 
 	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:
 			;




More information about the Bf-blender-cvs mailing list