[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30118] branches/soc-2010-jwilkins: * moved icon and color options to their own 'Appearance' panel

Jason Wilkins Jason.A.Wilkins at gmail.com
Thu Jul 8 17:35:27 CEST 2010


Revision: 30118
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30118
Author:   jwilkins
Date:     2010-07-08 17:35:27 +0200 (Thu, 08 Jul 2010)

Log Message:
-----------
* moved icon and color options to their own 'Appearance' panel

Modified Paths:
--------------
    branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py
    branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c

Modified: branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py	2010-07-08 15:14:32 UTC (rev 30117)
+++ branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py	2010-07-08 15:35:27 UTC (rev 30118)
@@ -1010,23 +1010,6 @@
         #edit = context.user_preferences.edit
         #col.prop(edit, "use_unified_radius_and_strength", text="Unified Size and Strength")
 
-        #col.separator();
-
-        if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'WAX', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN'):
-            sub = col.column()
-            sub.label(text="Color:")
-            sub.prop(brush, "add_col", text="Add")
-            sub.prop(brush, "sub_col", text="Substract")
-        else:
-            sub = col.column()
-            sub.prop(brush, "add_col", text="Color")
-
-        col.separator()
-        col.label(text="Icon:")
-        #col.template_ID_preview(brush, "image_icon", open="image.open", filter="is_image_icon", rows=3, cols=8)
-        col.template_ID_preview(brush, "image_icon", open="image.open", rows=3, cols=8)
-
-        col.separator()
         split = self.layout.split()
 
         col = split.column()
@@ -1047,6 +1030,34 @@
         col.prop(sculpt, "lock_y", text="Y")
         col.prop(sculpt, "lock_z", text="Z")
 
+class VIEW3D_PT_tools_brush_appearance(PaintPanel):
+    bl_label = "Appearance"
+
+    def poll(self, context):
+        return (context.sculpt_object and context.tool_settings.sculpt)
+
+    def draw(self, context):
+        layout = self.layout
+
+        sculpt = context.tool_settings.sculpt
+        settings = self.paint_settings(context)
+        brush = settings.brush
+
+        col = layout.column();
+
+        if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'WAX', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN'):
+            col.prop(brush, "add_col", text="Add Color")
+            col.prop(brush, "sub_col", text="Substract Color")
+        else:
+            col.prop(brush, "add_col", text="Color")
+
+        col.separator()
+
+        col = layout.column()
+        col.label(text="Icon:")
+        #col.template_ID_preview(brush, "image_icon", open="image.open", filter="is_image_icon", rows=3, cols=8)
+        col.template_ID_preview(brush, "image_icon", open="image.open", rows=3, cols=8)
+
 # ********** default tools for weightpaint ****************
 
 
@@ -1299,6 +1310,7 @@
     VIEW3D_PT_tools_brush_stroke,
     VIEW3D_PT_tools_brush_curve,
     VIEW3D_PT_sculpt_options,
+    VIEW3D_PT_tools_brush_appearance,
     VIEW3D_PT_tools_vertexpaint,
     VIEW3D_PT_tools_weightpaint_options,
 

Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-07-08 15:14:32 UTC (rev 30117)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-07-08 15:35:27 UTC (rev 30118)
@@ -2895,6 +2895,8 @@
 	else if(brush->flag & BRUSH_RAKE) {
 		int update;
 
+		// XXX: the rake angle is calculated in the cursor drawing code now, probably no need to duplicate it here
+
 		dx = cache->last_rake[0] - cache->mouse[0];
 		dy = cache->last_rake[1] - cache->mouse[1];
 





More information about the Bf-blender-cvs mailing list