Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-07-06 14:29:59 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-07-06 14:29:59 +0300
commita69e3c9ee16241068797b2852504441bfe3d5ca2 (patch)
tree6331a639372f609c49e20553ae48162a5fc8a22e /source
parent9d71ec5f8d8c74d4ae2dbec075d193ac0958de13 (diff)
Fix T51943: Depsgraph: world update happening eternally on background (set) scene
The issue was caused by updates being flushed for all scenes, while actual update was only called for an active one. Not sure why do we need to flush updates for all scenes, so now we only flush scenes which are updated.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/depsgraph/DEG_depsgraph.h2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc17
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));
}
}