[Bf-blender-cvs] [3ba200ccfe7] workspaces: Merge branch 'blender2.8' into workspaces
Campbell Barton
noreply at git.blender.org
Tue Apr 4 05:51:56 CEST 2017
Commit: 3ba200ccfe739133c56c86926d6d3f5a64697944
Author: Campbell Barton
Date: Tue Apr 4 13:43:13 2017 +1000
Branches: workspaces
https://developer.blender.org/rB3ba200ccfe739133c56c86926d6d3f5a64697944
Merge branch 'blender2.8' into workspaces
===================================================================
===================================================================
diff --cc source/blender/blenkernel/BKE_blender_version.h
index 207631d36bd,bc3db11f34b..ae87f1097d1
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@@ -27,8 -27,8 +27,8 @@@
/* these lines are grep'd, watch out for our not-so-awesome regex
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
- #define BLENDER_VERSION 278
- #define BLENDER_SUBVERSION 5
+ #define BLENDER_VERSION 280
-#define BLENDER_SUBVERSION 0
++#define BLENDER_SUBVERSION 1
/* Several breakages with 270, e.g. constraint deg vs rad */
#define BLENDER_MINVERSION 270
#define BLENDER_MINSUBVERSION 6
diff --cc source/blender/blenloader/intern/versioning_280.c
index de062761c6f,c93e11a6231..ea5239e8e3b
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -246,51 -185,43 +246,63 @@@ void do_versions_after_linking_280(Mai
scene->basact = NULL;
}
}
+ }
+
+ {
+ /* New workspace design */
- if (!MAIN_VERSION_ATLEAST(main, 278, 5)) {
++ if (!MAIN_VERSION_ATLEAST(main, 280, 1)) {
+ do_version_workspaces_after_lib_link(main);
+ }
- if (!MAIN_VERSION_ATLEAST(main, 278, 5)) {
- 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, 280, 1)) {
+ 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_calloc(soutliner->treestore);
+ tselem->type = TSE_LAYER_COLLECTION;
+ tselem->id = layer->layer_collections.first;
+ tselem->nr = tselem->used = 0;
+ tselem->flag &= ~TSE_CLOSED;
+ }
+ }
}
}
}
+ BKE_workspace_layout_iter_end;
}
+ BKE_workspace_iter_end;
}
}
+
+ if (!MAIN_VERSION_ATLEAST(main, 280, 0)) {
+ IDPropertyTemplate val = {0};
+ for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
+ scene->collection_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP);
+ BKE_layer_collection_engine_settings_create(scene->collection_properties);
+ }
+
+ for (Object *ob = main->object.first; ob; ob = ob->id.next) {
+ ob->collection_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP);
+ }
+ }
}
static void do_version_layer_collections_idproperties(ListBase *lb)
More information about the Bf-blender-cvs
mailing list