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 WorkSpace { | ||||
| /* 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 */ | ||||
| /* Custom transform orientations */ | /* Custom transform orientations */ | ||||
| ListBase transform_orientations DNA_PRIVATE_WORKSPACE; | ListBase transform_orientations DNA_PRIVATE_WORKSPACE; | ||||
| int object_mode DNA_PRIVATE_WORKSPACE; /* enum ObjectMode */ | int object_mode DNA_PRIVATE_WORKSPACE; /* enum ObjectMode */ | ||||
| int pad; | int flags DNA_PRIVATE_WORKSPACE; /* enum WorkSpaceFlags */ | ||||
| struct SceneLayer *render_layer DNA_PRIVATE_WORKSPACE; | struct SceneLayer *render_layer DNA_PRIVATE_WORKSPACE; | ||||
| char engine[32]; /* Render Engine. */ | |||||
| } WorkSpace; | } WorkSpace; | ||||
campbellbarton: Again, why not include this directly in the struct? (see same comment for `Scene`) | |||||
| /* internal struct, but exported for read/write */ | /* internal struct, but exported for read/write */ | ||||
| #if defined(DNA_PRIVATE_READ_WRITE_ALLOW) || defined(DNA_PRIVATE_WORKSPACE_ALLOW) | #if defined(DNA_PRIVATE_READ_WRITE_ALLOW) || defined(DNA_PRIVATE_WORKSPACE_ALLOW) | ||||
| /** | /** | ||||
| * Generic (and simple/primitive) struct for storing a history of assignments/relations | * 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. | * of workspace data to non-workspace data in a listbase inside the workspace. | ||||
| * | * | ||||
| Show All 35 Lines | typedef struct WorkSpaceInstanceHook { | ||||
| WorkSpace *active DNA_PRIVATE_WORKSPACE; | WorkSpace *active DNA_PRIVATE_WORKSPACE; | ||||
| struct WorkSpaceLayout *act_layout DNA_PRIVATE_WORKSPACE; | struct WorkSpaceLayout *act_layout DNA_PRIVATE_WORKSPACE; | ||||
| /* 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 WorkSpaceFlags { | |||||
Not Done Inline Actions*picky*, there is loose convention to use lowercase e for enum types. campbellbarton: *picky*, there is loose convention to use lowercase `e` for enum types. | |||||
| WORKSPACE_USE_SCENE_SETTINGS = (1 << 0), | |||||
| } WorkSpaceFlags; | |||||
| #endif /* __DNA_WORKSPACE_TYPES_H__ */ | #endif /* __DNA_WORKSPACE_TYPES_H__ */ | ||||
Again, why not include this directly in the struct? (see same comment for Scene)