[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37153] branches/soc-2011-onion: UI fixup for mask.
Jason Wilkins
Jason.A.Wilkins at gmail.com
Sat Jun 4 03:09:40 CEST 2011
Revision: 37153
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37153
Author: jwilkins
Date: 2011-06-04 01:09:38 +0000 (Sat, 04 Jun 2011)
Log Message:
-----------
UI fixup for mask.
set tool defaults, now works for mask brush
appropriate controls for mask brush, especially the direction enum
hid controls that should be fiddled with for mask (although autosmooth and gravity should work with mask, doesn't make a lot of sense)
Modified Paths:
--------------
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2011-onion/source/blender/blenkernel/intern/brush.c
branches/soc-2011-onion/source/blender/makesrna/intern/rna_brush.c
Modified: branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2011-06-03 23:56:15 UTC (rev 37152)
+++ branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2011-06-04 01:09:38 UTC (rev 37153)
@@ -533,14 +533,14 @@
row.prop(brush, "strength", text="Strength", slider=True)
row.prop(brush, "use_pressure_strength", text="")
- if brush.sculpt_tool not in {'SMOOTH'}:
+ if brush.sculpt_tool not in {'MASK', 'SMOOTH'}:
col.separator()
row = col.row(align=True)
row.prop(brush, "auto_smooth_factor", slider=True)
row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="")
- if brush.sculpt_tool not in ('GRAVITY'):
+ if brush.sculpt_tool not in ('MASK', 'GRAVITY'):
col.separator()
row = col.row(align=True)
@@ -558,7 +558,7 @@
row = col.row(align=True)
row.prop(brush, "crease_pinch_factor", slider=True, text="Pinch")
- if brush.sculpt_tool not in {'PINCH', 'INFLATE', 'SMOOTH'}:
+ if brush.sculpt_tool not in {'MASK', 'PINCH', 'INFLATE', 'SMOOTH'}:
col.separator()
row = col.row(align=True)
@@ -602,11 +602,11 @@
col.prop(brush, "use_accumulate")
- if brush.sculpt_tool not in ('LAYER', 'GRAB', 'ROTATE', 'THUMB', 'SMOOTH'):
+ if brush.sculpt_tool not in ('MASK', 'LAYER', 'GRAB', 'ROTATE', 'THUMB', 'SMOOTH'):
col.separator()
col.prop(brush, "use_layer", "Layer")
- else:
+ elif brush.sculpt_tool in ('LAYER'):
col.separator()
col.label("Layer:")
@@ -614,7 +614,7 @@
if brush.sculpt_tool in ('LAYER'):
col.separator()
- if brush.sculpt_tool not in ('GRAB', 'ROTATE', 'THUMB', 'SMOOTH'):
+ if brush.sculpt_tool not in ('MASK', 'GRAB', 'ROTATE', 'THUMB', 'SMOOTH'):
row = col.row()
row.prop(brush, "layer_limit", "Limit")
row.active = brush.use_layer
Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/brush.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/intern/brush.c 2011-06-03 23:56:15 UTC (rev 37152)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/brush.c 2011-06-04 01:09:38 UTC (rev 37153)
@@ -364,6 +364,15 @@
br->sub_col[0] = 0.25;
br->sub_col[1] = 1;
break;
+ case SCULPT_TOOL_MASK:
+ br->flag |= BRUSH_FRONTFACE;
+ br->add_col[0] = 0.750000;
+ br->add_col[1] = 0.750000;
+ br->add_col[2] = 0.750000;
+ br->sub_col[0] = 0.250000;
+ br->sub_col[1] = 0.250000;
+ br->sub_col[2] = 0.250000;
+ break;
case SCULPT_TOOL_INFLATE:
br->add_col[0] = 0.750000;
br->add_col[1] = 0.750000;
Modified: branches/soc-2011-onion/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- branches/soc-2011-onion/source/blender/makesrna/intern/rna_brush.c 2011-06-03 23:56:15 UTC (rev 37152)
+++ branches/soc-2011-onion/source/blender/makesrna/intern/rna_brush.c 2011-06-04 01:09:38 UTC (rev 37153)
@@ -311,6 +311,7 @@
case SCULPT_TOOL_BLOB:
case SCULPT_TOOL_LAYER:
case SCULPT_TOOL_CLAY:
+ case SCULPT_TOOL_MASK:
return prop_direction_items;
case SCULPT_TOOL_FLATTEN:
More information about the Bf-blender-cvs
mailing list