Transform: Enable recursion dependency check for new depsgraph

This commit is contained in:
Sergey Sharybin 2017-09-15 12:25:57 +05:00
parent 95a8e73d40
commit 8b3ad25862
Notes: blender-bot 2023-02-14 11:29:52 +01:00
Referenced by issue #53683, 2.79a release
4 changed files with 15 additions and 10 deletions

View File

@ -2018,6 +2018,7 @@ void DAG_scene_flush_update(Main *bmain, Scene *sce, unsigned int lay, const sho
int lasttime;
if (!DEG_depsgraph_use_legacy()) {
DEG_scene_flush_update(bmain, sce);
return;
}

View File

@ -134,6 +134,9 @@ void DEG_ids_clear_recalc(struct Main *bmain);
/* Flush updates for all IDs */
void DEG_ids_flush_tagged(struct Main *bmain);
/* Flush updates for IDs in a single scene. */
void DEG_scene_flush_update(struct Main *bmain, struct Scene *scene);
/* Check if something was changed in the database and inform
* editors about this.
*/

View File

@ -277,15 +277,20 @@ void DEG_ids_flush_tagged(Main *bmain)
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));
}
DEG_scene_flush_update(bmain, scene);
}
}
void DEG_scene_flush_update(Main *bmain, Scene *scene)
{
if (scene->depsgraph == NULL) {
return;
}
DEG::deg_graph_flush_updates(
bmain,
reinterpret_cast<DEG::Depsgraph *>(scene->depsgraph));
}
/* Update dependency graph when visible scenes/layers changes. */
void DEG_graph_on_visible_update(Main *bmain, Scene *scene)
{

View File

@ -5606,9 +5606,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 */
#ifdef WITH_LEGACY_DEPSGRAPH
DAG_scene_flush_update(G.main, t->scene, -1, 0);
#endif
/* and we store them temporal in base (only used for transform code) */
/* this because after doing updates, the object->recalc is cleared */
@ -5687,9 +5685,7 @@ static int count_proportional_objects(TransInfo *t)
/* all recalc flags get flushed to all layers, so a layer flip later on works fine */
DAG_scene_relations_update(G.main, t->scene);
#ifdef WITH_LEGACY_DEPSGRAPH
DAG_scene_flush_update(G.main, t->scene, -1, 0);
#endif
/* and we store them temporal in base (only used for transform code) */
/* this because after doing updates, the object->recalc is cleared */