[Bf-blender-cvs] [ee1177c896c] workspaces: Merge branch 'blender2.8' into workspaces
Julian Eisel
noreply at git.blender.org
Thu Mar 30 00:09:03 CEST 2017
Commit: ee1177c896c73189fcdd2daea727863f8edcf12c
Author: Julian Eisel
Date: Thu Mar 30 00:08:55 2017 +0200
Branches: workspaces
https://developer.blender.org/rBee1177c896c73189fcdd2daea727863f8edcf12c
Merge branch 'blender2.8' into workspaces
Conflicts:
source/blender/blenloader/intern/versioning_280.c
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/versioning_280.c
index 4bf04a79872,75628e59fa7..f0f2736a9ea
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -245,43 -184,25 +245,43 @@@ void do_versions_after_linking_280(Mai
scene->basact = NULL;
}
}
+ }
+
+ {
+ /* New workspace design */
+ if (!MAIN_VERSION_ATLEAST(main, 278, 5)) {
+ do_version_workspaces_after_lib_link(main);
+ }
- for (bScreen *screen = main->screen.first; screen; screen = screen->id.next) {
- for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
- for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
- if (sl->spacetype == SPACE_OUTLINER) {
- SpaceOops *soutliner = (SpaceOops *)sl;
- SceneLayer *layer = BKE_scene_layer_context_active(screen->scene);
-
- soutliner->outlinevis = SO_ACT_LAYER;
-
- if (BLI_listbase_count_ex(&layer->layer_collections, 2) == 1) {
- /* Create a tree store element for the collection. This is normally
- * done in check_persistent (outliner_tree.c), but we need to access
- * it here :/ (expand element if it's the only one) */
- TreeStoreElem *tselem = BLI_mempool_calloc(soutliner->treestore);
- tselem->type = TSE_LAYER_COLLECTION;
- tselem->id = layer->layer_collections.first;
- tselem->nr = tselem->used = 0;
- tselem->flag &= ~TSE_CLOSED;
+ if (!MAIN_VERSION_ATLEAST(main, 278, 5)) {
+ BKE_workspace_iter_begin(workspace, main->workspaces.first)
+ {
+ SceneLayer *layer = BKE_workspace_render_layer_get(workspace);
+ const bool is_single_collection = BLI_listbase_count_ex(&layer->layer_collections, 2) == 1;
+ ListBase *layouts = BKE_workspace_layouts_get(workspace);
+
+ BKE_workspace_layout_iter_begin(layout, layouts->first)
+ {
+ bScreen *screen = BKE_workspace_layout_screen_get(layout);
+
+ for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
+ for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_OUTLINER) {
+ SpaceOops *soutliner = (SpaceOops *)sl;
+
+ soutliner->outlinevis = SO_ACT_LAYER;
+
+ if (is_single_collection) {
+ /* Create a tree store element for the collection. This is normally
+ * done in check_persistent (outliner_tree.c), but we need to access
+ * it here :/ (expand element if it's the only one) */
- TreeStoreElem *tselem = BLI_mempool_alloc(soutliner->treestore);
++ TreeStoreElem *tselem = BLI_mempool_calloc(soutliner->treestore);
+ tselem->type = TSE_LAYER_COLLECTION;
+ tselem->id = layer->layer_collections.first;
+ tselem->nr = tselem->used = 0;
+ tselem->flag &= ~TSE_CLOSED;
+ }
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list