diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_depsgraph.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index f78a957cbab..14251fb1762 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -112,7 +112,7 @@ void DAG_scene_update_flags(struct Main *bmain, struct Scene *sce, unsigned int /* flushes all recalc flags in objects down the dependency tree */ void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time); /* tag objects for update on file load */ -void DAG_on_load_update(struct Main *bmain, const short do_time); +void DAG_on_visible_update(struct Main *bmain, const short do_time); /* when setting manual RECALC flags, call this afterwards */ void DAG_ids_flush_update(struct Main *bmain, int time); diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 9fb36d8f6b7..d1a181046a6 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -466,7 +466,7 @@ static int read_undosave(bContext *C, UndoElem *uel) if(success) { /* important not to update time here, else non keyed tranforms are lost */ - DAG_on_load_update(G.main, FALSE); + DAG_on_visible_update(G.main, FALSE); } return success; diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index ec75bfb1818..ff49c64ebf4 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2270,7 +2270,7 @@ void DAG_ids_flush_update(Main *bmain, int time) DAG_scene_flush_update(bmain, sce, lay, time); } -void DAG_on_load_update(Main *bmain, const short do_time) +void DAG_on_visible_update(Main *bmain, const short do_time) { Scene *scene; Base *base; @@ -2295,7 +2295,7 @@ void DAG_on_load_update(Main *bmain, const short do_time) node= (sce_iter->theDag)? dag_get_node(sce_iter->theDag, ob): NULL; oblay= (node)? node->lay: ob->lay; - if(oblay & lay) { + if((oblay & lay) & ~scene->lay_updated) { if(ELEM6(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE)) ob->recalc |= OB_RECALC_DATA; if(ob->dup_group) @@ -2318,6 +2318,7 @@ void DAG_on_load_update(Main *bmain, const short do_time) /* now tag update flags, to ensure deformers get calculated on redraw */ DAG_scene_update_flags(bmain, scene, lay, do_time); + scene->lay_updated |= lay; } } |