2.5 paint:
authorNicholas Bishop <nicholasbishop@gmail.com>
Mon, 17 Aug 2009 15:17:45 +0000 (15:17 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Mon, 17 Aug 2009 15:17:45 +0000 (15:17 +0000)
* Fixed texture paint UI

release/ui/space_view3d_toolbar.py
source/blender/blenkernel/intern/paint.c

index c8dedd7431c602b82e23f6d4e20c38bb1cf1f30f..1308791bdbc0cf6bd8f580887de3c73cb1143a3f 100644 (file)
@@ -292,7 +292,6 @@ class VIEW3D_PT_tools_brush(PaintPanel):
                
                settings = self.paint_settings(context)
                brush = settings.brush
-               paint = context.sculpt_object or context.vertex_paint_object
 
                if not context.particle_edit_object:
                        col = layout.split().column()
index 79d1df3d67f3200779c5c088cf2be3a3a78e8aa6..54192afb904dddcc77f5243e43074c0437d5ae49 100644 (file)
@@ -52,8 +52,7 @@ Paint *paint_get_active(Scene *sce)
                case OB_MODE_WEIGHT_PAINT:
                        return &ts->wpaint->paint;
                case OB_MODE_TEXTURE_PAINT:
-                       break;
-                       //return &ts->imapaint->paint;
+                       return &ts->imapaint.paint;
                }
        }
 
@@ -67,14 +66,14 @@ Brush *paint_brush(Paint *p)
 
 void paint_brush_set(Paint *p, Brush *br)
 {
-       if(!br) {
+       if(p && !br) {
                /* Setting to NULL removes the current slot */
                paint_brush_slot_remove(p);
        }
-       else {
+       else if(p) {
                int found = 0;
        
-               if(p && p->brushes) {
+               if(p->brushes) {
                        int i;
                        
                        /* See if there's already a slot with the brush */