[Bf-blender-cvs] [3441af49bd8] blender2.8: Depsgraph: Fix possibly missing lamp update when lamp data changes

Sergey Sharybin noreply at git.blender.org
Thu Jul 27 15:23:04 CEST 2017


Commit: 3441af49bd8788d9e48a4350fa2a2a14d9101555
Author: Sergey Sharybin
Date:   Thu Jul 27 14:40:49 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB3441af49bd8788d9e48a4350fa2a2a14d9101555

Depsgraph: Fix possibly missing lamp update when lamp data changes

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

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

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 3ada5d2f70c..70fbcd3d58a 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1717,6 +1717,21 @@ void DepsgraphRelationBuilder::build_lamp(Object *ob)
 
 	/* textures */
 	build_texture_stack(la->mtex);
+
+#ifdef WITH_COPY_ON_WRITE
+	/* Make sure copy on write of lamp data is always properly updated for
+	 * visible lamps.
+	 */
+	OperationKey ob_copy_on_write_key(&ob->id,
+	                                  DEG_NODE_TYPE_COPY_ON_WRITE,
+	                                  DEG_OPCODE_COPY_ON_WRITE);
+	OperationKey lamp_copy_on_write_key(lamp_id,
+	                                    DEG_NODE_TYPE_COPY_ON_WRITE,
+	                                    DEG_OPCODE_COPY_ON_WRITE);
+	add_relation(lamp_copy_on_write_key,
+	             ob_copy_on_write_key,
+	             "Evaluation Order");
+#endif
 }
 
 void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree)




More information about the Bf-blender-cvs mailing list