Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2013-08-02 04:24:34 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-08-02 04:24:34 +0400
commit53024698341690f53ce68f5b11b4c3635df833b5 (patch)
tree7ef62ffda7c0249c7a29071bab6a8882da46b8c8 /source/blender/blenloader
parent36df391b2fe0eccf8182d817cf3fc73cbc7bc6fd (diff)
Some versioning changes/patching of the brush system:
* Change overlay alphas to 33 if not initialized. This should have been done for 2.67 but better do it now to avoid frustration with overly transparent overlays. For users that have set this low manually this will reset the setting to 33 but I think it's less irritating than users who unwillingly had the setting to 1 and saw nothing when activating the overlay. * Allow overlay alpha to be zero as well * Reset old, now obsolete BRUSH_FIXED flag for brushes that still use this. I am doing this here to avoid patching hell when the paint brush is merged, since it's not possible to know the merged version beforehand, and this flag will be used.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 1ed22a53251..0ff3392ad00 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9495,6 +9495,22 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
brush->spacing = MAX2(1, brush->spacing);
}
}
+
+ if (!MAIN_VERSION_ATLEAST(main, 268, 2)) {
+ Brush *brush;
+ #define BRUSH_FIXED (1 << 6)
+ for (brush = main->brush.first; brush; brush = brush->id.next) {
+ brush->flag &= ~BRUSH_FIXED;
+
+ if(brush->cursor_overlay_alpha < 2)
+ brush->cursor_overlay_alpha = 33;
+ if(brush->texture_overlay_alpha < 2)
+ brush->texture_overlay_alpha = 33;
+ if(brush->mask_overlay_alpha <2)
+ brush->mask_overlay_alpha = 33;
+ }
+ #undef BRUSH_FIXED
+ }
{
bScreen *sc;