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:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-11-06 16:44:54 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-11-06 16:44:54 +0400
commitb8f22a0565c7b4a1b0b1eb2e8fbdaa3ebbd1a99e (patch)
tree60a5c8878d2282590a28e55399f171d720bcc2b2 /source/blender/blenloader
parentb91e841f8fa1af0d378870c614880d1b06cc9143 (diff)
Syncing methods for Color Balance node LGG and ASC-CDL modes. The settings for either mode are converted into equivalent settings of the other. This keeps the result of both modes roughly the same and
mimics the previous behavior when settings were shared by both modes (but not equivalent). NOTE: Due to the use of additional sRGB conversion in the LGG mode the result is not entirely accurate, this should perhaps be fixed. Settings for each mode are kept in their own color values nevertheless, this avoids potential problems with float precision.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 17ae0b103ca..aaf646b70bd 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9783,6 +9783,33 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
+ if (!MAIN_VERSION_ATLEAST(main, 269, 2)) {
+ /* Initialize CDL settings for Color Balance nodes */
+ FOREACH_NODETREE(main, ntree, id) {
+ if (ntree->type == NTREE_COMPOSIT) {
+ bNode *node;
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == CMP_NODE_COLORBALANCE) {
+ NodeColorBalance *n = node->storage;
+ if (node->custom1 == 0) {
+ /* LGG mode stays the same, just init CDL settings */
+ ntreeCompositColorBalanceSyncFromLGG(ntree, node);
+ }
+ else if (node->custom1 == 1) {
+ /* CDL previously used same variables as LGG, copy them over
+ * and then sync LGG for comparable results in both modes.
+ */
+ copy_v3_v3(n->offset, n->lift);
+ copy_v3_v3(n->power, n->gamma);
+ copy_v3_v3(n->slope, n->gain);
+ ntreeCompositColorBalanceSyncFromCDL(ntree, node);
+ }
+ }
+ }
+ }
+ } FOREACH_NODETREE_END
+ }
+
{
Scene *scene;