diff --git a/source/blender/blenkernel/intern/workspace.cc b/source/blender/blenkernel/intern/workspace.cc index c5d6d4c092a..c8f2d4a9dd2 100644 --- a/source/blender/blenkernel/intern/workspace.cc +++ b/source/blender/blenkernel/intern/workspace.cc @@ -70,8 +70,8 @@ static void workspace_foreach_id(ID *id, LibraryForeachIDData *data) { WorkSpace *workspace = (WorkSpace *)id; - BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, workspace->pin_scene, IDWALK_CB_NOP); - BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, workspace->sequencer_scene, IDWALK_CB_NOP); + BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, workspace->pin_scene, IDWALK_CB_DIRECT_WEAK_LINK); + BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, workspace->sequencer_scene, IDWALK_CB_DIRECT_WEAK_LINK); LISTBASE_FOREACH (WorkSpaceLayout *, layout, &workspace->layouts) { BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, layout->screen, IDWALK_CB_USER); diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 7f9c8690c9f..375b03fe105 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -4443,6 +4443,12 @@ static int expand_cb(LibraryIDLinkCallbackData *cb_data) return IDWALK_RET_NOP; } + /* Do not expand weak links. These are used when the user interface links to scene data, + * but we don't want to bring along such datablocks with a workspace. */ + if (cb_data->cb_flag & IDWALK_CB_DIRECT_WEAK_LINK) { + return IDWALK_RET_NOP; + } + /* Explicitly requested to be ignored during readfile processing. Means the read_data code * already handled this pointer. Typically, the 'owner_id' pointer of an embedded ID. */ if (cb_data->cb_flag & IDWALK_CB_READFILE_IGNORE) {