[Bf-blender-cvs] [13d4434] master: Partial fix for T43967: Background is wrong in 2.74
Sergey Sharybin
noreply at git.blender.org
Thu Mar 12 14:25:03 CET 2015
Commit: 13d443496c303c268fe14a4770696b5b68af61eb
Author: Sergey Sharybin
Date: Thu Mar 12 15:11:18 2015 +0500
Branches: master
https://developer.blender.org/rB13d443496c303c268fe14a4770696b5b68af61eb
Partial fix for T43967: Background is wrong in 2.74
Was missing do-versions code after rotation order change in Cycles.
This is a regression and to be ported to the final release branch.
===================================================================
M intern/cycles/blender/addon/version_update.py
===================================================================
diff --git a/intern/cycles/blender/addon/version_update.py b/intern/cycles/blender/addon/version_update.py
index 741c201..2fbb01b 100644
--- a/intern/cycles/blender/addon/version_update.py
+++ b/intern/cycles/blender/addon/version_update.py
@@ -21,10 +21,8 @@ import bpy
from bpy.app.handlers import persistent
-def check_is_new_shading_material(material):
- if not material.node_tree:
- return False
- for node in material.node_tree.nodes:
+def check_is_new_shading_ntree(node_tree):
+ for node in node_tree.nodes:
# If material has any node with ONLY new shading system
# compatibility then it's considered a Cycles material
# and versioning code would need to perform on it.
@@ -44,6 +42,24 @@ def check_is_new_shading_material(material):
return False
+def check_is_new_shading_material(material):
+ if not material.node_tree:
+ return False
+ return check_is_new_shading_ntree(material.node_tree)
+
+
+def check_is_new_shading_world(world):
+ if not world.node_tree:
+ return False
+ return check_is_new_shading_ntree(world.node_tree)
+
+
+def check_is_new_shading_lamp(lamp):
+ if not lamp.node_tree:
+ return False
+ return check_is_new_shading_ntree(lamp.node_tree)
+
+
def foreach_notree_node(nodetree, callback, traversed):
if nodetree in traversed:
return
@@ -61,6 +77,16 @@ def foreach_cycles_node(callback):
foreach_notree_node(material.node_tree,
callback,
traversed)
+ for world in bpy.data.worlds:
+ if check_is_new_shading_world(world):
+ foreach_notree_node(world.node_tree,
+ callback,
+ traversed)
+ for lamp in bpy.data.lamps:
+ if check_is_new_shading_world(lamp):
+ foreach_notree_node(lamp.node_tree,
+ callback,
+ traversed)
def mapping_node_order_flip(node):
More information about the Bf-blender-cvs
mailing list