[Bf-blender-cvs] [dfc0d3755b9] master: Depsgraph: Fix missing relation from node tree to light

Sergey Sharybin noreply at git.blender.org
Fri Jan 4 16:18:54 CET 2019


Commit: dfc0d3755b9bd4ce34a8384349ab28fe1c95b8c6
Author: Sergey Sharybin
Date:   Fri Jan 4 16:17:53 2019 +0100
Branches: master
https://developer.blender.org/rBdfc0d3755b9bd4ce34a8384349ab28fe1c95b8c6

Depsgraph: Fix missing relation from node tree to light

Was only happening when lamp had driver on the Light datablock.

Reported by Dalai Felinto in T60137.

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

M	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 04f3898b0f7..29a31ef4f98 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -1442,6 +1442,11 @@ void DepsgraphNodeBuilder::build_lamp(Lamp *lamp)
 	                             DEG_NODE_TYPE_PARAMETERS,
 	                             NULL,
 	                             DEG_OPCODE_PARAMETERS_EVAL);
+	/* NOTE: We mark this node as both entry and exit. This way we have a
+	 * node to link all dependencies for shading (which includes relation to the
+	 * lamp object, and incldues relation from node tree) without adding a
+	 * dedicated component type. */
+	op_node->set_as_entry();
 	op_node->set_as_exit();
 	/* lamp's nodetree */
 	build_nodetree(lamp->nodetree);



More information about the Bf-blender-cvs mailing list