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:
authorWilliam Reynish <william@reynish.com>2009-09-13 23:37:51 +0400
committerWilliam Reynish <william@reynish.com>2009-09-13 23:37:51 +0400
commitbe7eeb888af6cebe5d4162faa6e1b7551312410a (patch)
tree02d8fb65e96ded24684899720cb59971ac96b6db /source/blender/makesrna/intern/rna_brush.c
parent8c6176b84688fae585952992676d56903113c040 (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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c14
1 files changed, 10 insertions, 4 deletions
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.");