Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/readfile.cc
| Show First 20 Lines • Show All 2,780 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (wmWindow *, win, &curwm->windows) { | ||||
| workspace = static_cast<WorkSpace *>(restore_pointer_by_name(id_map, workspace_id, USER_REAL)); | workspace = static_cast<WorkSpace *>(restore_pointer_by_name(id_map, workspace_id, USER_REAL)); | ||||
| BKE_workspace_active_set(win->workspace_hook, workspace); | BKE_workspace_active_set(win->workspace_hook, workspace); | ||||
| win->scene = static_cast<Scene *>( | win->scene = static_cast<Scene *>( | ||||
| restore_pointer_by_name(id_map, (ID *)win->scene, USER_REAL)); | restore_pointer_by_name(id_map, (ID *)win->scene, USER_REAL)); | ||||
| if (win->scene == nullptr) { | if (win->scene == nullptr) { | ||||
| win->scene = curscene; | win->scene = curscene; | ||||
| } | } | ||||
| win->video_edit = static_cast<VideoEdit *>( | |||||
| restore_pointer_by_name(id_map, (ID *)win->video_edit, USER_REAL)); | |||||
| BLI_assert(win->video_edit != nullptr); | |||||
| win->unpinned_scene = static_cast<Scene *>( | win->unpinned_scene = static_cast<Scene *>( | ||||
| restore_pointer_by_name(id_map, (ID *)win->unpinned_scene, USER_IGNORE)); | restore_pointer_by_name(id_map, (ID *)win->unpinned_scene, USER_IGNORE)); | ||||
| if (BKE_view_layer_find(win->scene, win->view_layer_name) == nullptr) { | if (BKE_view_layer_find(win->scene, win->view_layer_name) == nullptr) { | ||||
| STRNCPY(win->view_layer_name, cur_view_layer->name); | STRNCPY(win->view_layer_name, cur_view_layer->name); | ||||
| } | } | ||||
| BKE_workspace_active_set(win->workspace_hook, workspace); | BKE_workspace_active_set(win->workspace_hook, workspace); | ||||
| /* keep cursor location through undo */ | /* keep cursor location through undo */ | ||||
| ▲ Show 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | switch ((ID_Type)id_code) { | ||||
| case ID_CV: | case ID_CV: | ||||
| return "Data from HA"; | return "Data from HA"; | ||||
| case ID_PT: | case ID_PT: | ||||
| return "Data from PT"; | return "Data from PT"; | ||||
| case ID_VO: | case ID_VO: | ||||
| return "Data from VO"; | return "Data from VO"; | ||||
| case ID_SIM: | case ID_SIM: | ||||
| return "Data from SIM"; | return "Data from SIM"; | ||||
| case ID_VE: | |||||
| return "Data from VE"; | |||||
| } | } | ||||
| return "Data from Lib Block"; | return "Data from Lib Block"; | ||||
| } | } | ||||
| static bool direct_link_id(FileData *fd, Main *main, const int tag, ID *id, ID *id_old) | static bool direct_link_id(FileData *fd, Main *main, const int tag, ID *id, ID *id_old) | ||||
| { | { | ||||
| BlendDataReader reader = {fd}; | BlendDataReader reader = {fd}; | ||||
| ▲ Show 20 Lines • Show All 2,159 Lines • Show Last 20 Lines | |||||