diff options
author | William Reynish <william@reynish.com> | 2009-09-13 23:37:51 +0400 |
---|---|---|
committer | William Reynish <william@reynish.com> | 2009-09-13 23:37:51 +0400 |
commit | be7eeb888af6cebe5d4162faa6e1b7551312410a (patch) | |
tree | 02d8fb65e96ded24684899720cb59971ac96b6db | |
parent | 8c6176b84688fae585952992676d56903113c040 (diff) |
Sculpt UI
*Changed Sculpt Modes Flip Direction to an enum so that you can explicitly choose Add or Subtract.
*Expanded the sculpt tool list. I realize Nicolas has a longer term plan for the brush tools, but at least now it's useable again.
-rw-r--r-- | release/ui/space_view3d_toolbar.py | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 14 |
2 files changed, 15 insertions, 7 deletions
diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py index 9dd2df14492..40ebb6883f0 100644 --- a/release/ui/space_view3d_toolbar.py +++ b/release/ui/space_view3d_toolbar.py @@ -399,7 +399,9 @@ class VIEW3D_PT_tools_brush(PaintPanel): elif context.sculpt_object and settings.brush: col = layout.column() col.itemS() - + col.itemR(brush, "sculpt_tool", expand=True) + col.itemS() + row = col.row(align=True) row.itemR(brush, "size", slider=True) row.itemR(brush, "size_pressure", toggle=True, text="") @@ -412,13 +414,13 @@ class VIEW3D_PT_tools_brush(PaintPanel): col = layout.column() if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'): - col.itemR(brush, "flip_direction") + col.row().itemR(brush, "direction", expand=True) if brush.sculpt_tool == 'LAYER': col.itemR(brush, "persistent") col.itemO("sculpt.set_persistent_base") - col.itemR(brush, "sculpt_tool") + # Texture Paint Mode # diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 448a2046855..612863e1ab9 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -104,6 +104,11 @@ void rna_def_brush(BlenderRNA *brna) {IMB_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting."}, {IMB_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting."}, {0, NULL, 0, NULL, NULL}}; + + static const EnumPropertyItem prop_flip_direction_items[]= { + {0, "ADD", 0, "Add", "Add effect of brush"}, + {BRUSH_DIR_IN, "SUBTRACT", 0, "Subtract", "Subtract effect of brush"}, + {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "Brush", "ID"); RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting."); @@ -117,6 +122,11 @@ void rna_def_brush(BlenderRNA *brna) prop= RNA_def_property(srna, "sculpt_tool", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, brush_sculpt_tool_items); RNA_def_property_ui_text(prop, "Sculpt Tool", ""); + + prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); + RNA_def_property_enum_items(prop, prop_flip_direction_items); + RNA_def_property_ui_text(prop, "Direction", "Mapping type to use for this image in the game engine."); /* number values */ prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE); @@ -192,10 +202,6 @@ void rna_def_brush(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ANCHORED); RNA_def_property_ui_text(prop, "Anchored", "Keep the brush anchored to the initial location."); - prop= RNA_def_property(srna, "flip_direction", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_DIR_IN); - RNA_def_property_ui_text(prop, "Flip Direction", "Move vertices in the opposite direction."); - prop= RNA_def_property(srna, "space", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE); RNA_def_property_ui_text(prop, "Space", "Limit brush application to the distance specified by spacing."); |