Depsgraph: Fix possibly missing lamp update when lamp data changes

This commit is contained in:
Sergey Sharybin 2017-07-27 14:40:49 +02:00
parent 41a3aafd48
commit 3441af49bd
1 changed files with 15 additions and 0 deletions

View File

@ -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)