diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 2 | ||||
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph.h | 2 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 17 |
3 files changed, 8 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 1e34781adfd..85c28b8bf54 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1517,7 +1517,7 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc prepare_mesh_for_viewport_render(bmain, scene); /* flush recalc flags to dependencies */ - DEG_ids_flush_tagged(bmain); + DEG_ids_flush_tagged(bmain, scene); /* removed calls to quick_cache, see pointcache.c */ diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h index 9caf7635ccf..9347a29b14a 100644 --- a/source/blender/depsgraph/DEG_depsgraph.h +++ b/source/blender/depsgraph/DEG_depsgraph.h @@ -182,7 +182,7 @@ void DEG_ids_clear_recalc(struct Main *bmain); /* Update Flushing ------------------------------- */ /* Flush updates for all IDs */ -void DEG_ids_flush_tagged(struct Main *bmain); +void DEG_ids_flush_tagged(struct Main *bmain, struct Scene *scene); /* Check if something was changed in the database and inform * editors about this. diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 80fa89bbb97..5b7294d92f9 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -291,18 +291,13 @@ void DEG_id_type_tag(Main *bmain, short idtype) /* Recursively push updates out to all nodes dependent on this, * until all affected are tagged and/or scheduled up for eval */ -void DEG_ids_flush_tagged(Main *bmain) +void DEG_ids_flush_tagged(Main *bmain, Scene *scene) { - for (Scene *scene = (Scene *)bmain->scene.first; - scene != NULL; - scene = (Scene *)scene->id.next) - { - /* TODO(sergey): Only visible scenes? */ - if (scene->depsgraph != NULL) { - DEG::deg_graph_flush_updates( - bmain, - reinterpret_cast<DEG::Depsgraph *>(scene->depsgraph)); - } + /* TODO(sergey): Only visible scenes? */ + if (scene->depsgraph != NULL) { + DEG::deg_graph_flush_updates( + bmain, + reinterpret_cast<DEG::Depsgraph *>(scene->depsgraph)); } } |