Commit: 7c4a6963e2fac0ace8b11f47a28794e453651c68
Author: Julian Eisel
Date: Thu Jan 5 22:24:17 2017 +0100
Branches: workspaces
https://developer.blender.org/rB7c4a6963e2fac0ace8b11f47a28794e453651c68
Fix foreach_ID_link iterator, undo version bump, cleanup
===================================================================
M source/blender/blenkernel/BKE_blender_version.h
M source/blender/blenkernel/intern/library_query.c
M source/blender/blenloader/intern/versioning_270.c
M source/blender/makesdna/DNA_windowmanager_types.h
===================================================================
diff --git a/source/blender/blenkernel/BKE_blender_version.h
b/source/blender/blenkernel/BKE_blender_version.h
index 207631d..4f4787f 100644
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@ -28,7 +28,7 @@
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 278
-#define BLENDER_SUBVERSION 5
+#define BLENDER_SUBVERSION 4
/* Several breakages with 270, e.g. constraint deg vs rad */
#define BLENDER_MINVERSION 270
#define BLENDER_MINSUBVERSION 6
diff --git a/source/blender/blenkernel/intern/library_query.c
b/source/blender/blenkernel/intern/library_query.c
index abb3079..4f385b3 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -871,7 +871,13 @@ void BKE_library_foreach_ID_link(ID *id,
LibraryIDLinkCallback callback, void *u
wmWindowManager *wm = (wmWindowManager *)id;
for (wmWindow *win = wm->windows.first; win;
win = win->next) {
+ ID *workspace =
BKE_workspace_id_get(win->workspace);
+
CALLBACK_INVOKE(win->scene,
IDWALK_USER_ONE);
+
+ CALLBACK_INVOKE_ID(workspace,
IDWALK_NOP);
+ /* allow callback to set a different
workspace */
+ win->workspace = (WorkSpace *)workspace;
}
break;
}
@@ -886,6 +892,8 @@ void BKE_library_foreach_ID_link(ID *id,
LibraryIDLinkCallback callback, void *u
bScreen *screen =
BKE_workspace_layout_screen_get(layout);
CALLBACK_INVOKE(screen, IDWALK_NOP);
+ /* allow callback to set a different
screen */
+ BKE_workspace_layout_screen_set(layout,
screen);
}
BKE_workspace_layout_iter_end;
diff --git a/source/blender/blenloader/intern/versioning_270.c
b/source/blender/blenloader/intern/versioning_270.c
index 0f87f21..344f4a7 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1564,7 +1564,7 @@ void blo_do_versions_270(FileData *fd, Library
*UNUSED(lib), Main *main)
}
}
- if (!MAIN_VERSION_ATLEAST(main, 278, 5)) {
+ {
/* New workspace design */
if (!DNA_struct_find(fd->filesdna, "WorkSpace")) {
do_version_workspaces_before_lib_link(main);
@@ -1574,7 +1574,7 @@ void blo_do_versions_270(FileData *fd, Library
*UNUSED(lib), Main *main)
void blo_do_versions_after_linking_270(FileData *fd, Main *main)
{
- if (!MAIN_VERSION_ATLEAST(main, 278, 5)) {
+ {
if (!DNA_struct_find(fd->filesdna, "WorkSpace")) {
do_version_workspaces_after_lib_link(main);
}
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h
b/source/blender/makesdna/DNA_windowmanager_types.h
index caa675f..0fb6a6d 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -180,9 +180,10 @@ typedef struct wmWindow {
struct Scene *scene; /* The scene displayed in this window. */
struct Scene *new_scene; /* temporary when switching */
- struct bScreen *screen DNA_DEPRECATED;
- struct WorkSpace *workspace; /* active workspace */
+ struct WorkSpace *workspace; /* active workspace */
struct WorkSpace *new_workspace; /* temporary when switching */
+
+ struct bScreen *screen DNA_DEPRECATED;
char screenname[64]; /* MAX_ID_NAME for matching window with
active screen after file read */
short posx, posy, sizex, sizey; /* window coords */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs