[Bf-blender-cvs] [6b55cd9e08d] workspaces: Merge branch 'blender2.8' into workspaces
Campbell Barton
noreply at git.blender.org
Tue Apr 4 04:54:49 CEST 2017
Commit: 6b55cd9e08dddd8cfb89fb3cc7c916faf9634838
Author: Campbell Barton
Date: Tue Apr 4 11:54:48 2017 +1000
Branches: workspaces
https://developer.blender.org/rB6b55cd9e08dddd8cfb89fb3cc7c916faf9634838
Merge branch 'blender2.8' into workspaces
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/layer.c
index 3f6af936236,a593d400f56..5407ca41001
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@@ -33,7 -33,7 +33,8 @@@
#include "BLT_translation.h"
#include "BKE_collection.h"
+#include "BKE_global.h"
+ #include "BKE_idprop.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_node.h"
diff --cc source/blender/blenloader/intern/readfile.c
index 9824b13337d,88d7424a278..4ff04a84356
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -6373,12 -6254,8 +6361,10 @@@ static void direct_link_scene(FileData
BKE_scene_layer_base_flag_recalculate(sl);
}
- link_list(fd, &sce->engines_settings);
- for (res = sce->engines_settings.first; res; res = res->next) {
- res->data = newdataadr(fd, res->data);
- }
+ sce->collection_properties = newdataadr(fd, sce->collection_properties);
+ IDP_DirectLinkGroup_OrFree(&sce->collection_properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+
+ direct_link_scene_update_screen_data(fd, &bmain->workspaces, &bmain->screen);
}
/* ************ READ WM ***************** */
@@@ -6459,14 -6330,11 +6445,14 @@@ static void lib_link_windowmanager(File
for (wm = main->wm.first; wm; wm = wm->id.next) {
if (wm->id.tag & LIB_TAG_NEED_LINK) {
- /* Note: WM IDProperties are never written to file, hence no need to read/link them here. */
for (win = wm->windows.first; win; win = win->next) {
+ /* Note: WM IDProperties are never written to file, hence no need to read/link them here. */
+ win->scene = newlibadr(fd, wm->id.lib, win->scene);
+ lib_link_workspace_instance_hook(fd, win->workspace_hook, &wm->id);
+ /* deprecated, but needed for versioning (will be NULL'ed then) */
win->screen = newlibadr(fd, NULL, win->screen);
}
-
+
wm->id.tag &= ~LIB_TAG_NEED_LINK;
}
}
diff --cc source/blender/blenloader/intern/versioning_280.c
index f0f2736a9ea,55d88240100..90ab4653a1f
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -308,14 -223,19 +304,26 @@@ void blo_do_versions_280(FileData *fd,
}
}
- /* temporary validation of 280 files for layers */
- blo_do_version_temporary(main);
+ if (!DNA_struct_elem_find(fd->filesdna, "Scene", "IDProperty", "collection_properties")) {
+ 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);
+ }
+ }
+
+ if (!DNA_struct_elem_find(fd->filesdna, "Object", "IDProperty", "collection_properties")) {
+ IDPropertyTemplate val = {0};
+ for (Object *ob = main->object.first; ob; ob = ob->id.next) {
+ ob->collection_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP);
+ }
+ }
}
+
+ {
+ /* New workspace design */
+ if (!DNA_struct_find(fd->filesdna, "WorkSpace")) {
+ do_version_workspaces_before_lib_link(main);
+ }
+ }
}
More information about the Bf-blender-cvs
mailing list