Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_workspace_types.h
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
| typedef struct WorkSpaceLayout { | typedef struct WorkSpaceLayout { | ||||
| struct WorkSpaceLayout *next, *prev; | struct WorkSpaceLayout *next, *prev; | ||||
| struct bScreen *screen DNA_PRIVATE_WORKSPACE; | struct bScreen *screen DNA_PRIVATE_WORKSPACE; | ||||
| /* The name of this layout, we override the RNA name of the screen with this (but not ID name itself) */ | /* The name of this layout, we override the RNA name of the screen with this (but not ID name itself) */ | ||||
| char name[64] DNA_PRIVATE_WORKSPACE; /* MAX_NAME */ | char name[64] DNA_PRIVATE_WORKSPACE; /* MAX_NAME */ | ||||
| } WorkSpaceLayout; | } WorkSpaceLayout; | ||||
| /** Optional tags, which features to use, aligned with #bAddon names by convention. */ | |||||
| typedef struct WorkSpaceUITag { | |||||
campbellbarton: Struct name is crummy (confuses with `BLO_*` API). Not sure of a better one. | |||||
Not Done Inline ActionsSame comment, do we really need BL in this name? brecht: Same comment, do we really need `BL` in this name? | |||||
| struct WorkSpaceUITag *next, *prev; | |||||
| char name[64] DNA_PRIVATE_WORKSPACE; /* MAX_NAME */ | |||||
| } WorkSpaceUITag; | |||||
| typedef struct WorkSpace { | typedef struct WorkSpace { | ||||
| ID id; | ID id; | ||||
| ListBase layouts DNA_PRIVATE_WORKSPACE; /* WorkSpaceLayout */ | ListBase layouts DNA_PRIVATE_WORKSPACE; /* WorkSpaceLayout */ | ||||
| /* Store for each hook (so for each window) which layout has | /* Store for each hook (so for each window) which layout has | ||||
| * been activated the last time this workspace was visible. */ | * been activated the last time this workspace was visible. */ | ||||
| ListBase hook_layout_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */ | ListBase hook_layout_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */ | ||||
| ListBase scene_viewlayer_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */ | ListBase scene_viewlayer_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */ | ||||
| /* Feature tagging (use for addons) */ | |||||
| ListBase ui_tags DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceUITag */ | |||||
| /* Custom transform orientations */ | /* Custom transform orientations */ | ||||
| ListBase transform_orientations DNA_PRIVATE_WORKSPACE; | ListBase transform_orientations DNA_PRIVATE_WORKSPACE; | ||||
| int pad; | int pad; | ||||
| int flags DNA_PRIVATE_WORKSPACE; /* enum eWorkSpaceFlags */ | int flags DNA_PRIVATE_WORKSPACE; /* enum eWorkSpaceFlags */ | ||||
| short object_mode, object_mode_restore; | short object_mode, object_mode_restore; | ||||
| char _pad[4]; | char _pad[4]; | ||||
| ▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | typedef struct WorkSpaceInstanceHook { | ||||
| /* Needed because we can't change workspaces/layouts in running handler loop, it would break context. */ | /* Needed because we can't change workspaces/layouts in running handler loop, it would break context. */ | ||||
| WorkSpace *temp_workspace_store; | WorkSpace *temp_workspace_store; | ||||
| struct WorkSpaceLayout *temp_layout_store; | struct WorkSpaceLayout *temp_layout_store; | ||||
| } WorkSpaceInstanceHook; | } WorkSpaceInstanceHook; | ||||
| typedef enum eWorkSpaceFlags { | typedef enum eWorkSpaceFlags { | ||||
| WORKSPACE_USE_SCENE_SETTINGS = (1 << 0), | WORKSPACE_USE_SCENE_SETTINGS = (1 << 0), | ||||
| WORKSPACE_USE_UI_TAGS = (1 << 1), | |||||
| } eWorkSpaceFlags; | } eWorkSpaceFlags; | ||||
| #endif /* __DNA_WORKSPACE_TYPES_H__ */ | #endif /* __DNA_WORKSPACE_TYPES_H__ */ | ||||
Struct name is crummy (confuses with BLO_* API). Not sure of a better one.