Fix some names, and move overlay flag to overlay_flags.
authorAntony Riakiotakis <kalast@gmail.com>
Tue, 16 Apr 2013 15:59:02 +0000 (15:59 +0000)
committerAntony Riakiotakis <kalast@gmail.com>
Tue, 16 Apr 2013 15:59:02 +0000 (15:59 +0000)
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/intern/brush.c
source/blender/blenloader/intern/readfile.c

index 7ea1b7e2c51e61731cdc4ea02d58d79915d85ee4..f9390cec9127612f44b5e98a2560553ce46614f2 100644 (file)
@@ -733,7 +733,7 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
         col.label(text="Overlay:")
 
         row = col.row()
-        if brush.use_texture_overlay:
+        if brush.use_primary_overlay:
             row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
         else:
             row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
index e4817b649e81e5472b4e055e24a882bbdfe1b592..909ba0c0df6902a7abe04e3aeffb2ac742c7f5fe 100644 (file)
@@ -766,7 +766,7 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
 
         row = col.row()
         if tex_slot.map_mode != 'STENCIL':
-            if brush.use_texture_overlay:
+            if brush.use_primary_overlay:
                 row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
             else:
                 row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
index 3e748550e7bc1856ccfc50795e91e29676a526ca..ce6f77ec4728abf09bfce04fd1d378f34398d915 100644 (file)
@@ -42,7 +42,7 @@ extern "C" {
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         266
-#define BLENDER_SUBVERSION      5
+#define BLENDER_SUBVERSION      6
 
 /* 262 was the last editmesh release but it has compatibility code for bmesh data */
 #define BLENDER_MINVERSION      262
index dd74df2b4ae34e0cdd6683c2a77102e014c1c224..dd299be97643a1831996f5c836fea5bd668873d9 100644 (file)
@@ -111,6 +111,9 @@ static void brush_defaults(Brush *brush)
 
        brush->texture_sample_bias = 0; /* value to added to texture samples */
        brush->texture_overlay_alpha = 33;
+       brush->mask_overlay_alpha = 33;
+       brush->cursor_overlay_alpha = 33;
+       brush->overlay_flags = 0;
 
        /* brush appearance  */
 
index f7c384371aeb51d53fc3ea5cec37f23dce4a95a0..fdbf2927464b66285778558ebd0d8cb8b6b56834 100644 (file)
@@ -9266,6 +9266,18 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                }
        }
 
+       if (!MAIN_VERSION_ATLEAST(main, 266, 6)) {
+               Brush *brush;
+               #define BRUSH_TEXTURE_OVERLAY (1 << 21)
+
+               for (brush = main->brush.first; brush; brush = brush->id.next) {
+                       brush->overlay_flags = 0;
+                       if (brush->flag & BRUSH_TEXTURE_OVERLAY)
+                               brush->overlay_flags |= (BRUSH_OVERLAY_PRIMARY | BRUSH_OVERLAY_CURSOR);
+               }
+               #undef BRUSH_TEXTURE_OVERLAY
+       }
+
        if (main->versionfile < 267) {
                //if(!DNA_struct_elem_find(fd->filesdna, "Brush", "int", "stencil_pos")) {
                Brush *brush;