diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-03-23 17:06:44 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-03-23 17:06:44 +0300 |
commit | edc5cf1f96f0f0a0eff65a4aa574dfae9c2fc606 (patch) | |
tree | 5ca4482dd77deeb33660e574bca88fedd268b259 /source/blender/blenkernel/intern/depsgraph.c | |
parent | 72fe34efb2a9787598fe10c3aefae3f523bd036f (diff) |
Fix #26573, #26574 and #26551: objects on layers not visible on load or undo
restore, would not get their dependencies updated when they became visible.
It happend with a shrinkwrap modifier in these reports, but could happen with
other modifiers too.
Now we keep track of which layers have ever been updated since load, and tag
objects on them to be recalculated when they become visible.
Diffstat (limited to 'source/blender/blenkernel/intern/depsgraph.c')
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } } |