From 1abd909a92b696eb556b071671314f35d5d5bde0 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 2 Apr 2019 13:21:21 +0200 Subject: Cleanup: remove DNA_PRIVATE_WORKSPACE hacks. This is just not practical to do for the code as a whole, and having it as an exception for one specific data structure is not that helpful. This has only been in the way for me when refactoring code. --- source/blender/makesdna/DNA_workspace_types.h | 40 +++++---------------------- 1 file changed, 7 insertions(+), 33 deletions(-) (limited to 'source/blender/makesdna/DNA_workspace_types.h') diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h index 3212ddb335e..37277d7df8e 100644 --- a/source/blender/makesdna/DNA_workspace_types.h +++ b/source/blender/makesdna/DNA_workspace_types.h @@ -17,9 +17,7 @@ /** \file * \ingroup DNA * - * Use API in BKE_workspace.h! - * Struct members marked with DNA_PRIVATE_WORKSPACE will throw a - * warning saying it's deprecated when used outside of workspace.c. + * Use API in BKE_workspace.h to edit these. */ #ifndef __DNA_WORKSPACE_TYPES_H__ @@ -27,25 +25,6 @@ #include "DNA_scene_types.h" -/* Same logic as DNA_DEPRECATED_ALLOW, but throws 'deprecated' - * warnings if DNA_PRIVATE_WORKSPACE_ALLOW is not defined */ -#ifdef DNA_PRIVATE_WORKSPACE_ALLOW - /* allow use of private items */ -# define DNA_PRIVATE_WORKSPACE -#else -# ifndef DNA_PRIVATE_WORKSPACE -# define DNA_PRIVATE_WORKSPACE DNA_PRIVATE_ATTR -# endif -#endif - -#ifdef DNA_PRIVATE_READ_WRITE_ALLOW -# define DNA_PRIVATE_WORKSPACE_READ_WRITE -#else -# ifndef DNA_PRIVATE_WORKSPACE_READ_WRITE -# define DNA_PRIVATE_WORKSPACE_READ_WRITE DNA_PRIVATE_WORKSPACE -# endif -#endif - /* Currently testing, allow to disable. */ #define USE_WORKSPACE_TOOL @@ -111,25 +90,25 @@ typedef struct WorkSpaceLayout { /* The name of this layout, we override the RNA name of the screen with this * (but not ID name itself) */ /** MAX_NAME. */ - char name[64] DNA_PRIVATE_WORKSPACE; + char name[64]; } WorkSpaceLayout; /** Optional tags, which features to use, aligned with #bAddon names by convention. */ typedef struct wmOwnerID { struct wmOwnerID *next, *prev; /** MAX_NAME. */ - char name[64] DNA_PRIVATE_WORKSPACE; + char name[64]; } wmOwnerID; typedef struct WorkSpace { ID id; /** WorkSpaceLayout. */ - ListBase layouts DNA_PRIVATE_WORKSPACE; + ListBase layouts; /* Store for each hook (so for each window) which layout has * been activated the last time this workspace was visible. */ /** WorkSpaceDataRelation. */ - ListBase hook_layout_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; + ListBase hook_layout_relations; /* Feature tagging (use for addons) */ /** #wmOwnerID. */ @@ -160,9 +139,6 @@ typedef struct WorkSpace { char *status_text; } WorkSpace; -/* internal struct, but exported for read/write */ -#if defined(DNA_PRIVATE_READ_WRITE_ALLOW) || defined(DNA_PRIVATE_WORKSPACE_ALLOW) - /** * Generic (and simple/primitive) struct for storing a history of assignments/relations * of workspace data to non-workspace data in a listbase inside the workspace. @@ -196,15 +172,13 @@ typedef struct WorkSpaceDataRelation { void *value; } WorkSpaceDataRelation; -#endif /* DNA_PRIVATE_WORKSPACE_READ_WRITE */ - /** * Little wrapper to store data that is going to be per window, but coming from the workspace. * It allows us to keep workspace and window data completely separate. */ typedef struct WorkSpaceInstanceHook { - WorkSpace *active DNA_PRIVATE_WORKSPACE; - struct WorkSpaceLayout *act_layout DNA_PRIVATE_WORKSPACE; + WorkSpace *active; + struct WorkSpaceLayout *act_layout; /* Needed because we can't change workspaces/layouts in running handler loop, * it would break context. */ -- cgit v1.2.3