Depsgraph: Switch to explicit graph specification for tag flush

This commit is contained in:
Sergey Sharybin
2017-10-24 15:25:41 +02:00
parent 72b61763da
commit 1829084da1
4 changed files with 7 additions and 7 deletions

View File

@@ -1608,7 +1608,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_scene_flush_update(bmain, scene);
DEG_graph_flush_update(bmain, scene->depsgraph_legacy);
/* removed calls to quick_cache, see pointcache.c */

View File

@@ -181,7 +181,7 @@ void DEG_ids_clear_recalc(struct Main *bmain);
/* Update Flushing ------------------------------- */
/* Flush updates for IDs in a single scene. */
void DEG_scene_flush_update(struct Main *bmain, struct Scene *scene);
void DEG_graph_flush_update(struct Main *bmain, Depsgraph *depsgraph);
/* Check if something was changed in the database and inform
* editors about this.

View File

@@ -431,12 +431,12 @@ void DEG_id_type_tag(Main *bmain, short id_type)
bmain->id_tag_update[BKE_idcode_to_index(id_type)] = 1;
}
void DEG_scene_flush_update(Main *bmain, Scene *scene)
void DEG_graph_flush_update(Main *bmain, Depsgraph *depsgraph)
{
if (scene->depsgraph_legacy == NULL) {
if (depsgraph == NULL) {
return;
}
DEG::deg_graph_flush_updates(bmain, (DEG::Depsgraph *)scene->depsgraph_legacy);
DEG::deg_graph_flush_updates(bmain, (DEG::Depsgraph *)depsgraph);
}
/* Update dependency graph when visible scenes/layers changes. */

View File

@@ -5603,7 +5603,7 @@ static void set_trans_object_base_flags(TransInfo *t)
}
/* all recalc flags get flushed to all layers, so a layer flip later on works fine */
DEG_scene_flush_update(G.main, t->scene);
DEG_graph_flush_update(G.main, t->scene->depsgraph_legacy);
/* and we store them temporal in base (only used for transform code) */
/* this because after doing updates, the object->recalc is cleared */
@@ -5683,7 +5683,7 @@ static int count_proportional_objects(TransInfo *t)
/* all recalc flags get flushed to all layers, so a layer flip later on works fine */
DEG_scene_relations_update(G.main, t->scene);
DEG_scene_flush_update(G.main, t->scene);
DEG_graph_flush_update(G.main, t->scene->depsgraph_legacy);
/* and we store them temporal in base (only used for transform code) */
/* this because after doing updates, the object->recalc is cleared */