Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/readfile.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 2,905 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void direct_link_workspace(FileData *fd, WorkSpace *workspace, const Main *main) | static void direct_link_workspace(FileData *fd, WorkSpace *workspace, const Main *main) | ||||
| { | { | ||||
| link_list(fd, BKE_workspace_layouts_get(workspace)); | link_list(fd, BKE_workspace_layouts_get(workspace)); | ||||
| link_list(fd, &workspace->hook_layout_relations); | link_list(fd, &workspace->hook_layout_relations); | ||||
| link_list(fd, &workspace->scene_viewlayer_relations); | link_list(fd, &workspace->scene_viewlayer_relations); | ||||
| link_list(fd, &workspace->owner_ids); | link_list(fd, &workspace->owner_ids); | ||||
| link_list(fd, &workspace->tool_refs); | |||||
| for (WorkSpaceDataRelation *relation = workspace->hook_layout_relations.first; | for (WorkSpaceDataRelation *relation = workspace->hook_layout_relations.first; | ||||
| relation; | relation; | ||||
| relation = relation->next) | relation = relation->next) | ||||
| { | { | ||||
| relation->parent = newglobadr(fd, relation->parent); /* data from window - need to access through global oldnew-map */ | relation->parent = newglobadr(fd, relation->parent); /* data from window - need to access through global oldnew-map */ | ||||
| relation->value = newdataadr(fd, relation->value); | relation->value = newdataadr(fd, relation->value); | ||||
| } | } | ||||
| Show All 9 Lines | static void direct_link_workspace(FileData *fd, WorkSpace *workspace, const Main *main) | ||||
| for (wmWindowManager *wm = main->wm.first; wm; wm = wm->id.next) { | for (wmWindowManager *wm = main->wm.first; wm; wm = wm->id.next) { | ||||
| for (wmWindow *win = wm->windows.first; win; win = win->next) { | for (wmWindow *win = wm->windows.first; win; win = win->next) { | ||||
| WorkSpaceLayout *act_layout = newdataadr(fd, BKE_workspace_active_layout_get(win->workspace_hook)); | WorkSpaceLayout *act_layout = newdataadr(fd, BKE_workspace_active_layout_get(win->workspace_hook)); | ||||
| if (act_layout) { | if (act_layout) { | ||||
| BKE_workspace_active_layout_set(win->workspace_hook, act_layout); | BKE_workspace_active_layout_set(win->workspace_hook, act_layout); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| for (bToolRef *tref = workspace->tool_refs.first; tref; tref = tref->next) { | |||||
| tref->runtime = NULL; | |||||
| } | |||||
| } | } | ||||
| static void lib_link_workspace_instance_hook(FileData *fd, WorkSpaceInstanceHook *hook, ID *id) | static void lib_link_workspace_instance_hook(FileData *fd, WorkSpaceInstanceHook *hook, ID *id) | ||||
| { | { | ||||
| WorkSpace *workspace = BKE_workspace_active_get(hook); | WorkSpace *workspace = BKE_workspace_active_get(hook); | ||||
| BKE_workspace_active_set(hook, newlibadr(fd, id->lib, workspace)); | BKE_workspace_active_set(hook, newlibadr(fd, id->lib, workspace)); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 7,711 Lines • Show Last 20 Lines | |||||