[Bf-blender-cvs] [b5349d967f1] master: Fix T60855: workspace duplicate does not preserve addons filters.
Brecht Van Lommel
noreply at git.blender.org
Mon Mar 11 14:35:04 CET 2019
Commit: b5349d967f1af433a9ee914aec72e028c3b2cd10
Author: Brecht Van Lommel
Date: Mon Mar 11 11:52:36 2019 +0100
Branches: master
https://developer.blender.org/rBb5349d967f1af433a9ee914aec72e028c3b2cd10
Fix T60855: workspace duplicate does not preserve addons filters.
===================================================================
M source/blender/editors/screen/workspace_edit.c
M source/blender/makesdna/DNA_workspace_types.h
===================================================================
diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c
index c777308e435..d68fdbca956 100644
--- a/source/blender/editors/screen/workspace_edit.c
+++ b/source/blender/editors/screen/workspace_edit.c
@@ -203,6 +203,9 @@ WorkSpace *ED_workspace_duplicate(
ListBase *layouts_old = BKE_workspace_layouts_get(workspace_old);
WorkSpace *workspace_new = ED_workspace_add(bmain, workspace_old->id.name + 2);
+ workspace_new->flags = workspace_old->flags;
+ BLI_duplicatelist(&workspace_new->owner_ids, &workspace_old->owner_ids);
+
/* TODO(campbell): tools */
for (WorkSpaceLayout *layout_old = layouts_old->first; layout_old; layout_old = layout_old->next) {
diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h
index daf6bb01ee9..3212ddb335e 100644
--- a/source/blender/makesdna/DNA_workspace_types.h
+++ b/source/blender/makesdna/DNA_workspace_types.h
@@ -133,7 +133,7 @@ typedef struct WorkSpace {
/* Feature tagging (use for addons) */
/** #wmOwnerID. */
- ListBase owner_ids DNA_PRIVATE_WORKSPACE_READ_WRITE;
+ ListBase owner_ids;
/* should be: '#ifdef USE_WORKSPACE_TOOL'. */
@@ -151,7 +151,7 @@ typedef struct WorkSpace {
int object_mode;
/** Enum eWorkSpaceFlags. */
- int flags DNA_PRIVATE_WORKSPACE;
+ int flags;
/* Number for workspace tab reordering in the UI. */
int order;
More information about the Bf-blender-cvs
mailing list