Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_workspace_types.h
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
| # ifndef DNA_PRIVATE_WORKSPACE_READ_WRITE | # ifndef DNA_PRIVATE_WORKSPACE_READ_WRITE | ||||
| # define DNA_PRIVATE_WORKSPACE_READ_WRITE DNA_PRIVATE_WORKSPACE | # define DNA_PRIVATE_WORKSPACE_READ_WRITE DNA_PRIVATE_WORKSPACE | ||||
| # endif | # endif | ||||
| #endif | #endif | ||||
| /* Currently testing, allow to disable. */ | /* Currently testing, allow to disable. */ | ||||
| #define USE_WORKSPACE_TOOL | #define USE_WORKSPACE_TOOL | ||||
| typedef struct bToolDef { | # | ||||
| # | |||||
| typedef struct bToolRef_Runtime { | |||||
| /* One of these must be defined. */ | /* One of these must be defined. */ | ||||
| char keymap[64]; | char keymap[64]; | ||||
| char manipulator_group[64]; | char manipulator_group[64]; | ||||
| char data_block[64]; | char data_block[64]; | ||||
| int spacetype; | |||||
| /* index when a tool is a member of a group */ | /* index when a tool is a member of a group */ | ||||
| int index; | int index; | ||||
| } bToolDef; | } bToolRef_Runtime; | ||||
| /* Stored per mode. */ | |||||
| typedef struct bToolRef { | |||||
| struct bToolRef *next, *prev; | |||||
| char idname[64]; | |||||
| /** bToolKey (spacetype, mode), used in 'WM_api.h' */ | |||||
| int space_type; | |||||
| /** | |||||
| * Value depends ont the 'space_type', object mode for 3D view, image editor has own mode too. | |||||
| * RNA needs to handle using item function. | |||||
| */ | |||||
| int mode; | |||||
| /** Variables needed to operate the tool. */ | |||||
| bToolRef_Runtime *runtime; | |||||
| } bToolRef; | |||||
| /** | /** | ||||
| * \brief Wrapper for bScreen. | * \brief Wrapper for bScreen. | ||||
| * | * | ||||
| * bScreens are IDs and thus stored in a main list-base. We also want to store a list-base of them within the | * bScreens are IDs and thus stored in a main list-base. We also want to store a list-base of them within the | ||||
| * workspace (so each workspace can have its own set of screen-layouts) which would mess with the next/prev pointers. | * workspace (so each workspace can have its own set of screen-layouts) which would mess with the next/prev pointers. | ||||
| * So we use this struct to wrap a bScreen pointer with another pair of next/prev pointers. | * So we use this struct to wrap a bScreen pointer with another pair of next/prev pointers. | ||||
| */ | */ | ||||
| Show All 18 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 */ | ||||
| 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) */ | /* Feature tagging (use for addons) */ | ||||
| ListBase owner_ids DNA_PRIVATE_WORKSPACE_READ_WRITE; /* wmOwnerID */ | ListBase owner_ids DNA_PRIVATE_WORKSPACE_READ_WRITE; /* wmOwnerID */ | ||||
| int pad; | struct ViewLayer *view_layer DNA_DEPRECATED; | ||||
| int flags DNA_PRIVATE_WORKSPACE; /* enum eWorkSpaceFlags */ | |||||
| /* should be: '#ifdef USE_WORKSPACE_TOOL'. */ | /* should be: '#ifdef USE_WORKSPACE_TOOL'. */ | ||||
| bToolDef tool; | |||||
| struct ViewLayer *view_layer DNA_DEPRECATED; | /** List of #bToolRef */ | ||||
| ListBase tools; | |||||
| /** | |||||
| * BAD DESIGN WARNING: | |||||
| * This is a workaround for the topbar not knowing which tools spac */ | |||||
| char tools_space_type; | |||||
| /** Type is different for each space-type. */ | |||||
| char tools_mode; | |||||
| char _pad[2]; | |||||
| int flags DNA_PRIVATE_WORKSPACE; /* enum eWorkSpaceFlags */ | |||||
| } WorkSpace; | } WorkSpace; | ||||
| /* 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 20 Lines • Show All 49 Lines • Show Last 20 Lines | |||||