diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-25 15:37:03 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-25 15:37:03 +0300 |
commit | 40b3d951bca6d62ce61f2a1e2fa5955f2f964c8f (patch) | |
tree | 2994ed1edf0337e2e67f44f62e257a76209cc456 /source/blender/blenkernel/intern | |
parent | a08f633aeb3f9955f33cd5396181afc96772f68b (diff) |
Depsgraph: Don't touch set scenes when evaluating scene
Objects from set scene gets flattened out to the active scene depsgraph, so it
is a big question why do we need to build dependency graph for set scenes.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 3171fb099ed..20611c18a5c 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1588,16 +1588,12 @@ static void prepare_mesh_for_viewport_render(Main *bmain, Scene *scene) void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *scene) { - Scene *sce_iter; - /* (re-)build dependency graph if needed */ - for (sce_iter = scene; sce_iter; sce_iter = sce_iter->set) { - DEG_scene_relations_update(bmain, sce_iter); - /* Uncomment this to check if graph was properly tagged for update. */ + DEG_scene_relations_update(bmain, scene); + /* Uncomment this to check if graph was properly tagged for update. */ #if 0 - DEG_scene_relations_validate(bmain, sce_iter); + DEG_scene_relations_validate(bmain, scene); #endif - } /* flush editing data if needed */ prepare_mesh_for_viewport_render(bmain, scene); @@ -1606,9 +1602,9 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc DEG_graph_flush_update(bmain, scene->depsgraph_legacy); /* removed calls to quick_cache, see pointcache.c */ - + /* clear "LIB_TAG_DOIT" flag from all materials, to prevent infinite recursion problems later - * when trying to find materials with drivers that need evaluating [#32017] + * when trying to find materials with drivers that need evaluating [#32017] */ BKE_main_id_tag_idcode(bmain, ID_MA, LIB_TAG_DOIT, false); BKE_main_id_tag_idcode(bmain, ID_LA, LIB_TAG_DOIT, false); @@ -1632,7 +1628,6 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc void BKE_scene_update_for_newframe(EvaluationContext *eval_ctx, Main *bmain, Scene *sce) { float ctime = BKE_scene_frame_get(sce); - Scene *sce_iter; DEG_editors_update_pre(bmain, sce, true); @@ -1644,12 +1639,11 @@ void BKE_scene_update_for_newframe(EvaluationContext *eval_ctx, Main *bmain, Sce BKE_image_update_frame(bmain, sce->r.cfra); BKE_sound_set_cfra(sce->r.cfra); - + /* clear animation overrides */ /* XXX TODO... */ - for (sce_iter = sce; sce_iter; sce_iter = sce_iter->set) - DEG_scene_relations_update(bmain, sce_iter); + DEG_scene_relations_update(bmain, sce); /* Update animated cache files for modifiers. */ BKE_cachefile_update_frame(bmain, sce, ctime, (((double)sce->r.frs_sec) / (double)sce->r.frs_sec_base)); @@ -1659,7 +1653,7 @@ void BKE_scene_update_for_newframe(EvaluationContext *eval_ctx, Main *bmain, Sce #endif /* clear "LIB_TAG_DOIT" flag from all materials, to prevent infinite recursion problems later - * when trying to find materials with drivers that need evaluating [#32017] + * when trying to find materials with drivers that need evaluating [#32017] */ BKE_main_id_tag_idcode(bmain, ID_MA, LIB_TAG_DOIT, false); BKE_main_id_tag_idcode(bmain, ID_LA, LIB_TAG_DOIT, false); |