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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-11-18 17:32:50 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-11-18 17:32:50 +0300
commitf6083b7bcd6901ae8d8452e34d1230afaa8da3fb (patch)
treefb3f30a1a6a8fc47d02f3dccfcaa05fac3926b88 /source/blender/blenloader
parent8f0dc3cef6c3f3e02a0a4322cd241cf379e52552 (diff)
Fix (unreported) bad handling of brush's fill threshold value.
'1' threshold value would only allow to access a third of the basic 'color space' (from black to white, from 0.0 to 1.0 component values), when you expect it to access the whole range. Unfortunately, this needs a subversion bump to allow already defined brushes to keep exact same behavior! Also, did not change default value (0.2) for new brushes, think here keeping current one makes more sense. Thanks to @LucaRood for confirming the issue.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_270.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 8133d0496fa..25d78b73d59 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1466,4 +1466,11 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
+
+ if (!MAIN_VERSION_ATLEAST(main, 278, 4)) {
+ const float sqrt_3 = (float)M_SQRT3;
+ for (Brush *br = main->brush.first; br; br = br->id.next) {
+ br->fill_threshold /= sqrt_3;
+ }
+ }
}