[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28033] trunk/blender: Fix [#21440] Bug or loose feature? Texture painting brushes

Matt Ebb matt at mke3.net
Tue Apr 6 07:52:52 CEST 2010


Revision: 28033
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28033
Author:   broken
Date:     2010-04-06 07:52:52 +0200 (Tue, 06 Apr 2010)

Log Message:
-----------
Fix [#21440] Bug or loose feature? Texture painting brushes

Removed extra brush features that aren't applicable in some painting modes from the UI.
Would be great to have this properly cleaned up and made consistent.

Also tweak to startup blend, hiding brush tools panel.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_texture.py
    trunk/blender/release/scripts/ui/space_view3d_toolbar.py
    trunk/blender/source/blender/editors/datafiles/B.blend.c

Modified: trunk/blender/release/scripts/ui/properties_texture.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_texture.py	2010-04-06 05:02:59 UTC (rev 28032)
+++ trunk/blender/release/scripts/ui/properties_texture.py	2010-04-06 05:52:52 UTC (rev 28033)
@@ -203,6 +203,12 @@
 class TEXTURE_PT_mapping(TextureSlotPanel):
     bl_label = "Mapping"
 
+    def poll(self, context):
+        idblock = context_tex_datablock(context)
+        if type(idblock) == bpy.types.Brush and not context.sculpt_object:
+            return False
+        return True
+
     def draw(self, context):
         layout = self.layout
 
@@ -242,15 +248,16 @@
                 split.prop(tex, "object", text="")
 
         if type(idblock) == bpy.types.Brush:
-            layout.prop(tex, "map_mode", expand=True)
-
-            row = layout.row()
-            row.active = tex.map_mode in ('FIXED', 'TILED')
-            row.prop(tex, "angle")
-
-            row = layout.row()
-            row.active = tex.map_mode in ('TILED', '3D')
-            row.column().prop(tex, "size")
+            if context.sculpt_object:
+                layout.prop(tex, "map_mode", expand=True)
+    
+                row = layout.row()
+                row.active = tex.map_mode in ('FIXED', 'TILED')
+                row.prop(tex, "angle")
+    
+                row = layout.row()
+                row.active = tex.map_mode in ('TILED', '3D')
+                row.column().prop(tex, "size")
         else:
             if type(idblock) == bpy.types.Material:
                 split = layout.split(percentage=0.3)

Modified: trunk/blender/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2010-04-06 05:02:59 UTC (rev 28032)
+++ trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2010-04-06 05:52:52 UTC (rev 28033)
@@ -668,7 +668,8 @@
 
         col.template_ID_preview(brush, "texture", new="texture.new", rows=2, cols=4)
 
-        col.row().prop(tex_slot, "map_mode", expand=True)
+        if context.sculpt_object:
+            col.row().prop(tex_slot, "map_mode", expand=True)
 
 
 class VIEW3D_PT_tools_brush_tool(PaintPanel):

Modified: trunk/blender/source/blender/editors/datafiles/B.blend.c
===================================================================
--- trunk/blender/source/blender/editors/datafiles/B.blend.c	2010-04-06 05:02:59 UTC (rev 28032)
+++ trunk/blender/source/blender/editors/datafiles/B.blend.c	2010-04-06 05:52:52 UTC (rev 28033)
@@ -1,418 +1,415 @@
 /* DataToC output of file <B_blend> */
 
-int datatoc_B_blend_size= 395872;
+int datatoc_B_blend_size= 406288;
 char datatoc_B_blend[]= {
-
- 66, 76, 69, 78, 68, 69, 82, 45,118, 50, 53, 50, 82, 69, 78, 68, 32,  0,  0,  0,112,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,128,230,191, 95,255,127,  0,  0,200,  0,  0,  0,  1,  0,  0,  0, 32, 32, 32, 50,
-  2,  0,  0,  0,250,  0,  0,  0,  1,  0,  0,  1,176,206, 83, 22,  1,  0,  0,  0, 48,218,173,  4,  1,  0,  0,  0,  0, 16,  0,  0,
-128,  0,  4,  0, 60,109,101,109,111,114,121, 50, 62,  0,  0,  0,  0,  0,  0,  0,226, 76,241,  1,  1,  0,  0,  0, 40,  0,  0,  0,
- 48,  0,  0,  0,176,231,191, 95,255,127,  0,  0,224,230,191, 95,255,127,  0,  0,208, 38,171, 30, 32,  0,  0,  0,112,231,191, 95,
-255,127,  0,  0, 64,140, 49, 30,  1,  0,  0,  0, 45,  0,  0,  0,  0,  0,  0,  0,118,  0,  0,  0,  0,  0,  0,  0, 80,231,191, 95,
-255,127,  0,  0, 65,209, 98,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,112,231,191, 95,255,127,  0,  0, 32,  0,  0,  0,
- 82, 69, 78, 68, 64,140, 49, 30,  1,  0,  0,  0, 82, 69, 78, 68, 32,  0,  0,  0,112,231,191, 95,255,127,  0,  0,  0,  0,  0,  0,
-  1,  0,  0,  0,160,231,191, 95,255,127,  0,  0,160,231,191, 95,255,127,  0,  0, 20,216, 98,  0,  1,  0,  0,  0, 48,162,172,  4,
-  1,  0,  0,  0, 64,140, 49, 30,  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,176,206, 83, 22,  1,  0,  0,  0, 87, 77,  0,  0, 16,  1,  0,  0,160,139, 82, 22,
-  1,  0,  0,  0,106,  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,240,140, 82, 22,  1,  0,  0,  0,240,140, 82, 22,
-  1,  0,  0,  0,240,140, 82, 22,  1,  0,  0,  0,240,140, 82, 22,  1,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,240,148, 53, 30,
-  1,  0,  0,  0,240,148, 53, 30,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 80,108, 53, 30,
-  1,  0,  0,  0, 80,108, 53, 30,  1,  0,  0,  0,  2,  0,  0,  0,  2,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+ 66, 76, 69, 78, 68, 69, 82, 45,118, 50, 53, 50, 82, 69, 78, 68,
+ 32,  0,  0,  0, 96,237,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,112,236,191, 95,
+255,127,  0,  0,200,  0,  0,  0,  1,  0,  0,  0, 32, 32, 32, 52,  4,  0,  0,  0,250,  0,  0,  0,  1,  0,  0,  1,160,161, 58, 30,
+  1,  0,  0,  0, 48,  6,182, 29,  1,  0,  0,  0,  0, 16,  0,  0,128,  0,  4,  0, 60,109,101,109,111,114,121, 50, 62,  0,  0,  0,
+  0,  0,  0,  0, 34, 26,242,  1,  1,  0,  0,  0, 40,  0,  0,  0, 48,  0,  0,  0,160,237,191, 95,255,127,  0,  0,208,236,191, 95,
+255,127,  0,  0,208,134,105, 29, 32,  0,  0,  0, 96,237,191, 95,255,127,  0,  0, 96,239,132, 22,  1,  0,  0,  0, 45,  0,  0,  0,
+  0,  0,  0,  0,118,  0,  0,  0,  0,  0,  0,  0, 64,237,191, 95,255,127,  0,  0, 45, 98, 99,  0,  1,  0,  0,  0,  0,  0,  0,  0,
+  0,  0,  0,  0, 96,237,191, 95,255,127,  0,  0, 32,  0,  0,  0, 82, 69, 78, 68, 96,239,132, 22,  1,  0,  0,  0, 82, 69, 78, 68,
+ 32,  0,  0,  0, 96,237,191, 95,255,127,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,144,237,191, 95,255,127,  0,  0,144,237,191, 95,
+255,127,  0,  0,  0,105, 99,  0,  1,  0,  0,  0, 48,178,191, 29,  1,  0,  0,  0, 96,239,132, 22,  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,160,161, 58, 30,
+  1,  0,  0,  0, 87, 77,  0,  0, 16,  1,  0,  0,160,101, 57, 30,  1,  0,  0,  0,108,  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,240,102, 57, 30,  1,  0,  0,  0,240,102, 57, 30,  1,  0,  0,  0,240,102, 57, 30,  1,  0,  0,  0,240,102, 57, 30,
+  1,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,192, 65, 57, 30,  1,  0,  0,  0,112,204,133, 22,  1,  0,  0,  0,  0,  0,  0,  0,
+  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,240, 60, 50, 30,  1,  0,  0,  0,176,225,133, 22,  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, 64, 82, 57, 30,
+  1,  0,  0,  0, 64, 82, 57, 30,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,192,108,143, 22,
+  1,  0,  0,  0,192,108,143, 22,  1,  0,  0,  0,192,108,143, 22,  1,  0,  0,  0,224, 94, 88, 29,  1,  0,  0,  0,224, 94, 88, 29,
+  1,  0,  0,  0,224, 94, 88, 29,  1,  0,  0,  0, 68, 65, 84, 65,224,  0,  0,  0,240,102, 57, 30,  1,  0,  0,  0,109,  1,  0,  0,
+  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,208,101,128, 22,  1,  0,  0,  0,  1,  0,  0,  0,
+  0,  0,  0,  0,160,161, 58, 30,  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,160,104,141, 22,  1,  0,  0,  0,192, 97, 88, 29,  1,  0,  0,  0,  0,  0,  0,  0,
+  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0, 96, 52, 49, 28,  1,  0,  0,  0, 16,240,132, 22,  1,  0,  0,  0, 16,240,132, 22,
+  1,  0,  0,  0,128, 95, 88, 29,  1,  0,  0,  0, 64, 96, 88, 29,  1,  0,  0,  0,  0, 97, 88, 29,  1,  0,  0,  0,  0, 97, 88, 29,
+  1,  0,  0,  0,192, 97, 88, 29,  1,  0,  0,  0,208, 74,141, 22,  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, 16,104, 57, 30,  1,  0,  0,  0,194,  0,  0,  0,  1,  0,  0,  0,144, 13, 58, 30,
+  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,112, 89,141, 22,  1,  0,  0,  0,128,105, 57, 30,  1,  0,  0,  0,224,105, 57, 30,  1,  0,  0,  0, 96,116, 57, 30,
+  1,  0,  0,  0,192,116, 57, 30,  1,  0,  0,  0,224,254, 57, 30,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+  0,  0,  0,  0, 48,  6,182, 29,  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,  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, 32,  3, 80, 22,  1,  0,  0,  0, 32,  3, 80, 22,  1,  0,  0,  0, 32,  3, 80, 22,
-  1,  0,  0,  0, 64,  4, 80, 22,  1,  0,  0,  0, 64,  4, 80, 22,  1,  0,  0,  0, 64,  4, 80, 22,  1,  0,  0,  0, 68, 65, 84, 65,
-224,  0,  0,  0,240,140, 82, 22,  1,  0,  0,  0,107,  1,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  0,  0,  0,  0,112, 18, 80, 22,  1,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,176,206, 83, 22,  1,  0,  0,  0,  0,  0,  0,  0,

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list