[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23192] trunk/blender: Sculpt UI

William Reynish william at reynish.com
Sun Sep 13 21:37:59 CEST 2009


Revision: 23192
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23192
Author:   billrey
Date:     2009-09-13 21:37:51 +0200 (Sun, 13 Sep 2009)

Log Message:
-----------
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. 

Modified Paths:
--------------
    trunk/blender/release/ui/space_view3d_toolbar.py
    trunk/blender/source/blender/makesrna/intern/rna_brush.c

Modified: trunk/blender/release/ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/ui/space_view3d_toolbar.py	2009-09-13 19:22:36 UTC (rev 23191)
+++ trunk/blender/release/ui/space_view3d_toolbar.py	2009-09-13 19:37:51 UTC (rev 23192)
@@ -399,7 +399,9 @@
 		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 @@
 				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 #
 		

Modified: trunk/blender/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_brush.c	2009-09-13 19:22:36 UTC (rev 23191)
+++ trunk/blender/source/blender/makesrna/intern/rna_brush.c	2009-09-13 19:37:51 UTC (rev 23192)
@@ -104,6 +104,11 @@
 		{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 @@
 	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 @@
 	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.");





More information about the Bf-blender-cvs mailing list