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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-08-27 12:09:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-27 12:20:38 +0300
commit666be7d8860b56cacd22a9e8f1a859e4611754b7 (patch)
tree39cb12adcc1e2386df7b55bebc0b9d2c8920f6ab /source
parentebe7a407d738aba1b7ea508576ec1530db4f1447 (diff)
Fix T69166: built-in start-up file has unnecessary screen data
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index fa69892584a..fa22fd46068 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -329,6 +329,14 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
BLI_strncpy(screen->id.name + 2, workspace->id.name + 2, sizeof(screen->id.name) - 2);
BLI_libblock_ensure_unique_name(bmain, screen->id.name);
}
+
+ /* For some reason we have unused screens, needed until re-saving.
+ * Clear unused layouts because they're visible in the outliner & Python API. */
+ LISTBASE_FOREACH_MUTABLE (WorkSpaceLayout *, layout_iter, &workspace->layouts) {
+ if (layout != layout_iter) {
+ BKE_workspace_layout_remove(bmain, workspace, layout_iter);
+ }
+ }
}
/* Scenes */