diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-09 18:42:10 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-09 18:42:54 +0300 |
commit | 3dde21f97ef6a7b4c2dfb1dc196530de04a1576a (patch) | |
tree | 528dca37ca27ce07f3082d76cfed25ac196d2fc7 /source/blender/depsgraph/intern/depsgraph_query.cc | |
parent | cec7f1215acffcd31e591fce83d78268aff6e72a (diff) |
Depsgraph: Fix broken copy-on-write draw after ownership changes
Need to build layer collections callbacks using proper CoW pointer.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_query.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index 8b451ccee32..940cadba872 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -92,7 +92,13 @@ Scene *DEG_get_evaluated_scene(Depsgraph *graph) SceneLayer *DEG_get_evaluated_scene_layer(Depsgraph *graph) { DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph); - return deg_graph->scene_layer; + Scene *scene_cow = DEG_get_evaluated_scene(graph); + SceneLayer *scene_layer_orig = deg_graph->scene_layer; + SceneLayer *scene_layer_cow = + (SceneLayer *)BLI_findstring(&scene_cow->render_layers, + scene_layer_orig->name, + offsetof(SceneLayer, name)); + return scene_layer_cow; } Object *DEG_get_evaluated_object(Depsgraph *depsgraph, Object *object) |