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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index d44eda49151..b5e2f0146dd 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7406,25 +7406,21 @@ static void lib_link_window_scene_data_restore(wmWindow *win, Scene *scene)
}
if (v3d->localvd) {
- /*Base *base;*/
+ Base *base;
v3d->localvd->camera = scene->camera;
- /* localview can become invalid during undo/redo steps, so we exit it when no could be found */
-#if 0 /* XXX regionlocalview ? */
- for (base= sc->scene->base.first; base; base= base->next) {
- if (base->lay & v3d->lay) break;
+ /* Localview can become invalid during undo/redo steps, so we exit it when no could be found. */
+ for (base = screen->scene->base.first; base; base = base->next) {
+ if (base->local_view_bits & v3d->local_view_uuid) {
+ break;
+ }
}
- if (base==NULL) {
- v3d->lay= v3d->localvd->lay;
- v3d->layact= v3d->localvd->layact;
+ if (base == NULL) {
MEM_freeN(v3d->localvd);
- v3d->localvd= NULL;
+ v3d->localvd = NULL;
+ v3d->local_view_uuid = 0;
}
-#endif
- }
- else if (v3d->scenelock) {
- v3d->lay = scene->lay;
}
}
}
@@ -7446,9 +7442,6 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map, Main
v3d->camera = restore_pointer_by_name(id_map, (ID *)v3d->camera, USER_REAL);
v3d->ob_centre = restore_pointer_by_name(id_map, (ID *)v3d->ob_centre, USER_REAL);
- /* not very nice, but could help */
- if ((v3d->layact & v3d->lay) == 0) v3d->layact = v3d->lay;
-
/* free render engines for now */
for (ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_WINDOW) {