[Bf-blender-cvs] [b48e6799f15] master: Fix missing version patching from lamp/light and subsurface changes.

Brecht Van Lommel noreply at git.blender.org
Sun Mar 24 16:33:14 CET 2019


Commit: b48e6799f151b82d6af6487a851051b88a438007
Author: Brecht Van Lommel
Date:   Sun Mar 24 14:48:23 2019 +0100
Branches: master
https://developer.blender.org/rBb48e6799f151b82d6af6487a851051b88a438007

Fix missing version patching from lamp/light and subsurface changes.

===================================================================

M	source/blender/blenloader/intern/versioning_280.c

===================================================================

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;
 	}
 }



More information about the Bf-blender-cvs mailing list