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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-24 16:48:23 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-24 16:49:49 +0300
commitb48e6799f151b82d6af6487a851051b88a438007 (patch)
treea0695bc021344306c3ede431555b97db18fdd1ea /source/blender/blenloader
parent16694ed408a533fcf275db8f92a5d0c7c0cbd854 (diff)
Fix missing version patching from lamp/light and subsurface changes.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 6c5eb269c5c..c4775b77eee 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -2931,5 +2931,19 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ FOREACH_NODETREE_BEGIN(bmain, ntree, id) {
+ if (ntree->type == NTREE_SHADER) {
+ for (bNode *node = ntree->nodes.first; node; node = node->next) {
+ /* Fix missing version patching from earlier changes. */
+ if (STREQ(node->idname, "ShaderNodeOutputLamp")) {
+ STRNCPY(node->idname, "ShaderNodeOutputLight");
+ }
+ if (node->type == SH_NODE_BSDF_PRINCIPLED && node->custom2 == 0) {
+ node->custom2 = SHD_SUBSURFACE_BURLEY;
+ }
+ }
+ }
+ } FOREACH_NODETREE_END;
}
}