[Bf-blender-cvs] [9fa84d640f1] workspaces: Fix files loading with wrong screen in 2.7x
Campbell Barton
noreply at git.blender.org
Tue Apr 4 15:09:33 CEST 2017
Commit: 9fa84d640f151938378f06d3347c7dd7499db911
Author: Campbell Barton
Date: Tue Apr 4 23:08:02 2017 +1000
Branches: workspaces
https://developer.blender.org/rB9fa84d640f151938378f06d3347c7dd7499db911
Fix files loading with wrong screen in 2.7x
===================================================================
M source/blender/blenloader/intern/writefile.c
===================================================================
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 03464766b37..4971a224200 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2824,6 +2824,13 @@ static void write_windowmanager(WriteData *wd, wmWindowManager *wm)
write_iddata(wd, &wm->id);
for (wmWindow *win = wm->windows.first; win; win = win->next) {
+
+ /* update deprecated screen member (for so loading in 2.7x uses the correct screen) */
+ win->screen = BKE_workspace_active_screen_get(win->workspace_hook);
+ if (win->screen) {
+ BLI_strncpy(win->screenname, win->screen->id.name + 2, sizeof(win->screenname));
+ }
+
writestruct(wd, DATA, wmWindow, 1, win);
writestruct(wd, DATA, WorkSpaceInstanceHook, 1, win->workspace_hook);
writestruct(wd, DATA, Stereo3dFormat, 1, win->stereo3d_format);
More information about the Bf-blender-cvs
mailing list