Depsgraph: Fix IDs being remapped in original compositor

Happens with files from T65223.

Caused by CoW scene still pointing to the original compositor.
Happens when scene was referenced for parameters only.
This commit is contained in:
Sergey Sharybin 2019-05-29 12:48:59 +02:00
parent d6b340b999
commit b0278b2486
1 changed files with 11 additions and 0 deletions

View File

@ -47,6 +47,17 @@ void DepsgraphNodeBuilder::build_scene_parameters(Scene *scene)
}
add_operation_node(&scene->id, NodeType::PARAMETERS, OperationCode::SCENE_EVAL);
add_operation_node(&scene->id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EVAL);
/* NOTE: This is a bit overkill and can potentially pull a bit too much into the graph, but:
*
* - We definitely need an ID node for the scene's compositor, othetrwise re-mapping will no
* happen correct and we will risk remapping pointers in the main database.
* - Alternatively, we should discard compositor tree, but this might cause other headache like
* drivers which are coming from the tree.
*
* Would be nice to find some reliable way of ignoring compositor here, but it's already pulled
* in when building scene from view layer, so this particular case does not make things
* marginally worse. */
build_scene_compositor(scene);
}
void DepsgraphNodeBuilder::build_scene_compositor(Scene *scene)