[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26132] trunk/blender: Moved the image paint tool and the vertex/weight paint tool (blend mode?)

Matt Ebb matt at mke3.net
Wed Jan 20 09:30:40 CET 2010


Revision: 26132
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26132
Author:   broken
Date:     2010-01-20 09:30:40 +0100 (Wed, 20 Jan 2010)

Log Message:
-----------
Moved the image paint tool and the vertex/weight paint tool (blend mode?) 
to the Brush data. This now works the same way as sculpt, with named 
preset brushes that retain settings.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_view3d_toolbar.py
    trunk/blender/source/blender/editors/datafiles/B.blend.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
    trunk/blender/source/blender/editors/space_image/image_draw.c
    trunk/blender/source/blender/makesdna/DNA_brush_types.h
    trunk/blender/source/blender/makesdna/DNA_scene_types.h
    trunk/blender/source/blender/makesrna/intern/rna_brush.c
    trunk/blender/source/blender/makesrna/intern/rna_sculpt_paint.c

Modified: trunk/blender/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2010-01-20 06:47:47 UTC (rev 26131)
+++ trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2010-01-20 08:30:40 UTC (rev 26132)
@@ -500,13 +500,13 @@
             row = col.row()
 
             if context.sculpt_object and brush:
-                defaulttools = 8
+                defaultbrushes = 8
             elif context.texture_paint_object and brush:
-                defaulttools = 4
+                defaultbrushes = 4
             else:
-                defaulttools = 2
+                defaultbrushes = 7
 
-            row.template_list(settings, "brushes", settings, "active_brush_index", rows=2, maxrows=defaulttools)
+            row.template_list(settings, "brushes", settings, "active_brush_index", rows=2, maxrows=defaultbrushes)
 
             col.template_ID(settings, "brush", new="brush.add")
 
@@ -657,8 +657,9 @@
 
     def poll(self, context):
         settings = self.paint_settings(context)
-        return (settings and settings.brush and (context.sculpt_object or
-                             context.texture_paint_object))
+        return (settings and settings.brush and
+            (context.sculpt_object or context.texture_paint_object or 
+            context.vertex_paint_object or context.weight_paint_object))
 
     def draw(self, context):
         layout = self.layout
@@ -673,10 +674,13 @@
         if context.sculpt_object:
             col.prop(brush, "sculpt_tool", expand=True)
         elif context.texture_paint_object:
-            col.prop_enum(settings, "tool", 'DRAW')
-            col.prop_enum(settings, "tool", 'SOFTEN')
-            col.prop_enum(settings, "tool", 'CLONE')
-            col.prop_enum(settings, "tool", 'SMEAR')
+            col.prop(brush, "imagepaint_tool", expand=True)
+            #col.prop_enum(settings, "tool", 'DRAW')
+            #col.prop_enum(settings, "tool", 'SOFTEN')
+            #col.prop_enum(settings, "tool", 'CLONE')
+            #col.prop_enum(settings, "tool", 'SMEAR')
+        elif context.vertex_paint_object or context.weight_paint_object:
+            col.prop(brush, "vertexpaint_tool", expand=True)
 
 
 class VIEW3D_PT_tools_brush_stroke(PaintPanel):
@@ -780,7 +784,6 @@
         layout = self.layout
 
         col = layout.column()
-        # col.label(text="Blend:")
         col.operator("object.vertex_group_normalize_all", text="Normalize All")
         col.operator("object.vertex_group_normalize", text="Normalize")
         col.operator("object.vertex_group_invert", text="Invert")
@@ -798,8 +801,6 @@
         wpaint = context.tool_settings.weight_paint
 
         col = layout.column()
-        col.label(text="Blend:")
-        col.prop(wpaint, "mode", text="")
         col.prop(wpaint, "all_faces")
         col.prop(wpaint, "normals")
         col.prop(wpaint, "spray")
@@ -830,8 +831,7 @@
         vpaint = context.tool_settings.vertex_paint
 
         col = layout.column()
-        col.label(text="Blend:")
-        col.prop(vpaint, "mode", text="")
+        #col.prop(vpaint, "mode", text="")
         col.prop(vpaint, "all_faces")
         col.prop(vpaint, "normals")
         col.prop(vpaint, "spray")
@@ -850,7 +850,7 @@
     bl_label = "Project Paint"
 
     def poll(self, context):
-        return context.tool_settings.image_paint.tool != 'SMEAR'
+        return context.tool_settings.image_paint.brush.imagepaint_tool != 'SMEAR'
 
     def draw_header(self, context):
         ipaint = context.tool_settings.image_paint
@@ -893,7 +893,7 @@
         col = layout.column()
         sub = col.column()
         row = sub.row()
-        row.active = (settings.tool == 'CLONE')
+        row.active = (settings.brush.imagepaint_tool == 'CLONE')
 
         row.prop(ipaint, "use_clone_layer", text="Clone")
         row.menu("VIEW3D_MT_tools_projectpaint_clone", text=context.active_object.data.uv_texture_clone.name)

Modified: trunk/blender/source/blender/editors/datafiles/B.blend.c
===================================================================
--- trunk/blender/source/blender/editors/datafiles/B.blend.c	2010-01-20 06:47:47 UTC (rev 26131)
+++ trunk/blender/source/blender/editors/datafiles/B.blend.c	2010-01-20 08:30:40 UTC (rev 26132)
@@ -1,393 +1,961 @@
 /* DataToC output of file <B_blend> */
 
-int datatoc_B_blend_size= 337300;
+int datatoc_B_blend_size= 386864;
 char datatoc_B_blend[]= {
- 66, 76, 69, 78, 68, 69, 82, 45,118, 50, 53, 48, 82, 69, 78, 68, 32,  0,  0,  0,
-176,231,191, 95,255,127,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  1,  0,  0,  0,250,  0,  0,  0, 83, 99,101,110,101,  0,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 71, 76, 79, 66, 24,  1,  0,  0,192,230,191, 95,255,127,  0,  0,
-198,  0,  0,  0,  1,  0,  0,  0, 32, 32, 49, 49, 11,  0,  0,  0,250,  0,  0,  0,  1,  0,  0,  1,192,100,232, 19,  1,  0,  0,  0,
- 48,154,  5,  3,  1,  0,  0,  0,  0, 16,  0,  0,128, 32,  4,  0, 47, 85,115,101,114,115, 47,109, 97,116,116, 47, 46, 66, 50, 53,
- 46, 98,108,101,110,100,  0,  0, 40,  0,  0,  0, 48,  0,  0,  0,240,231,191, 95,255,127,  0,  0, 32,231,191, 95,255,127,  0,  0,
-208,150,170, 28, 32,  0,  0,  0,176,231,191, 95,255,127,  0,  0, 16,119,230,  2,  1,  0,  0,  0, 45,  0,  0,  0,  0,  0,  0,  0,
-118,  0,  0,  0,  0,  0,  0,  0,144,231,191, 95,255,127,  0,  0,209,227, 94,  0,  1,  0,  0,  0,112,231,191, 95,255,127,  0,  0,
-176,231,191, 95,255,127,  0,  0, 32,  0,  0,  0, 82, 69, 78, 68, 16,119,230,  2,  1,  0,  0,  0, 82, 69, 78, 68, 32,  0,  0,  0,
-176,231,191, 95,255,127,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,224,231,191, 95,255,127,  0,  0,224,231,191, 95,255,127,  0,  0,
-151,234, 94,  0,  1,  0,  0,  0, 48,  6,  5,  3,  1,  0,  0,  0, 16,119,230,  2,  1,  0,  0,  0,  1,  0,  0,  0,250,  0,  0,  0,
- 83, 99,101,110,101,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,192,100,232, 19,  1,  0,  0,  0,
- 87, 77,  0,  0,  0,  1,  0,  0, 16, 38,231, 19,  1,  0,  0,  0,100,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 87, 77, 87,105,110, 77, 97,110,
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
- 96, 39,231, 19,  1,  0,  0,  0, 96, 39,231, 19,  1,  0,  0,  0, 96, 39,231, 19,  1,  0,  0,  0, 96, 39,231, 19,  1,  0,  0,  0,
-  3,  0,  0,  0,  0,  0,  0,  0,176,202,212, 27,  1,  0,  0,  0,240, 51,212, 27,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0,160,210,211, 27,  1,  0,  0,  0,160, 32,213, 27,  1,  0,  0,  0,  2,  0,  0,  0,  2,  0,  0,  0,
-  2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,144, 89,209, 27,  1,  0,  0,  0,
-144, 89,209, 27,  1,  0,  0,  0,160,187,226, 19,  1,  0,  0,  0,160,187,226, 19,  1,  0,  0,  0,160,187,226, 19,  1,  0,  0,  0,
-192,188,226, 19,  1,  0,  0,  0,192,188,226, 19,  1,  0,  0,  0,192,188,226, 19,  1,  0,  0,  0, 68, 65, 84, 65,224,  0,  0,  0,
- 96, 39,231, 19,  1,  0,  0,  0,101,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-160,202,226, 19,  1,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,192,100,232, 19,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-115, 99,114,101,101,110,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  0,  0,  0,  0,128,  7,128,  4,  0,  0,  0,  0,  1,  0,238,  3,  0,  0,  1,  0,  0,  0,  0,  0, 64,179,230,  2,  1,  0,  0,  0,
-128,109,239, 19,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,128,109, 47, 27,  1,  0,  0,  0,
- 64,161,212, 27,  1,  0,  0,  0, 64,161,212, 27,  1,  0,  0,  0, 64,100,227, 19,  1,  0,  0,  0,112,101,239, 19,  1,  0,  0,  0,
- 80,248,192, 24,  1,  0,  0,  0, 80,248,192, 24,  1,  0,  0,  0,128,109,239, 19,  1,  0,  0,  0,176, 91,194, 24,  1,  0,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 83, 78,  0,  0,208,  0,  0,  0,128, 40,231, 19,  1,  0,  0,  0,
-192,  0,  0,  0,  1,  0,  0,  0,  0,211,231, 19,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0, 83, 82, 65,110,105,109, 97,116,105,111,110,  0, 46, 48, 48, 49,  0,  0,  0,  0,  0,  0,  0,  0,
-  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,144, 41,231, 19,  1,  0,  0,  0,240, 47,231, 19,  1,  0,  0,  0,
- 80, 48,231, 19,  1,  0,  0,  0,208, 58,231, 19,  1,  0,  0,  0, 48, 59,231, 19,  1,  0,  0,  0,  0,196,231, 19,  1,  0,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 48,154,  5,  3,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+ 66, 76, 69, 78, 68, 69, 82, 45,118, 50, 53, 48, 82, 69, 78, 68,
+ 32,  0,  0,  0,208,229,191, 95,255,127,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  1,  0,  0,  0,250,  0,  0,  0, 83, 99,101,110,
+101,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 71, 76, 79, 66, 24,  1,  0,  0,224,228,191, 95,
+255,127,  0,  0,198,  0,  0,  0,  1,  0,  0,  0, 32, 32, 49, 49, 11,  0,  0,  0,250,  0,  0,  0,  1,  0,  0,  1,176,  8,233, 19,
+  1,  0,  0,  0, 48,  0,  6,  3,  1,  0,  0,  0,  0, 16,  0,  0,128, 32,  4,  0, 60,109,101,109,111,114,121, 50, 62,  0,  0,  0,
+  0,  0,  0,  0,186,140, 35,  1,  1,  0,  0,  0, 40,  0,  0,  0, 48,  0,  0,  0, 16,230,191, 95,255,127,  0,  0, 64,229,191, 95,
+255,127,  0,  0,208, 54,182, 28, 32,  0,  0,  0,208,229,191, 95,255,127,  0,  0,112, 55,135, 28,  1,  0,  0,  0, 45,  0,  0,  0,
+  0,  0,  0,  0,118,  0,  0,  0,  0,  0,  0,  0,176,229,191, 95,255,127,  0,  0,221,138, 95,  0,  1,  0,  0,  0,  0,  0,  0,  0,
+  0,  0,  0,  0,208,229,191, 95,255,127,  0,  0, 32,  0,  0,  0, 82, 69, 78, 68,112, 55,135, 28,  1,  0,  0,  0, 82, 69, 78, 68,
+ 32,  0,  0,  0,208,229,191, 95,255,127,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,230,191, 95,255,127,  0,  0,  0,230,191, 95,
+255,127,  0,  0,163,145, 95,  0,  1,  0,  0,  0, 48, 78,  4,  3,  1,  0,  0,  0,112, 55,135, 28,  1,  0,  0,  0,  1,  0,  0,  0,

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list