Blender V5.3
DNA_workspace_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#pragma once
12
13#include "BLI_enum_flags.hh"
14
15#include "DNA_ID.h"
16#include "DNA_asset_types.h"
18
19namespace blender {
20
21namespace bke {
22struct WorkSpaceRuntime;
23}
24
35
36#
37#
39 int cursor = 0;
40
42 char keymap[64] = "";
43 char gizmo_group[64] = "";
44 char data_block[64] = "";
52 int brush_type = 0;
53
55 char keymap_fallback[64] = "";
56
58 char op[64] = "";
59
61 int index = 0;
64};
65
69struct bToolRef {
70 struct bToolRef *next = nullptr, *prev = nullptr;
71 char idname[64] = "";
72
74 char idname_fallback[64] = "";
75
90 char idname_pending[64] = "";
91
93 short tag = 0;
94
96 short space_type = 0;
103 int mode = 0;
104
113
116};
117
128 struct WorkSpaceLayout *next = nullptr, *prev = nullptr;
129
130 struct bScreen *screen = nullptr;
131 /* The name of this layout, we override the RNA name of the screen with this
132 * (but not ID name itself) */
133 char name[/*MAX_NAME*/ 64] = "";
134};
135
137struct wmOwnerID {
138 struct wmOwnerID *next = nullptr, *prev = nullptr;
140 char name[128] = "";
141};
142
143enum eWorkSpaceFlags : int {
146 /* Used for syncing time between sequencer scene strips and the active scene. */
148};
150
151struct WorkSpace {
152#ifdef __cplusplus
154 static constexpr ID_Type id_type = ID_WS;
155#endif
156
158
159 ListBaseT<WorkSpaceLayout> layouts = {nullptr, nullptr};
160 /* Store for each hook (so for each window) which layout has
161 * been activated the last time this workspace was visible. */
162 ListBaseT<struct WorkSpaceDataRelation> hook_layout_relations = {nullptr, nullptr};
163
164 /* Feature tagging (use for addons) */
165 ListBaseT<wmOwnerID> owner_ids = {nullptr, nullptr};
166
167 ListBaseT<bToolRef> tools = {nullptr, nullptr};
168
171 struct Scene *pin_scene = nullptr;
172
173 /* Scene that is used by the sequence editors in this workspace. */
174 struct Scene *sequencer_scene = nullptr;
175
176 char _pad[4] = {};
177
178 int object_mode = 0;
179
181
183 int order = 0;
184
187
191
198};
199
224 struct WorkSpaceDataRelation *next = nullptr, *prev = nullptr;
225
229 void *parent = nullptr;
231 void *value = nullptr;
232
234 int parentid = 0;
235 char _pad_0[4] = {};
236};
237
253
254} // namespace blender
#define ENUM_OPERATORS(_enum_type)
ID and Library types, which are fundamental for SDNA.
BMesh Iterators.
@ WORKSPACE_USE_FILTER_BY_ORIGIN
@ TOOLREF_FLAG_FALLBACK_KEYMAP
struct WorkSpaceDataRelation * next
struct WorkSpaceDataRelation * prev
struct WorkSpaceLayout * temp_layout_store
struct WorkSpaceLayout * act_layout
struct WorkSpaceLayout * next
struct WorkSpaceLayout * prev
bke::WorkSpaceRuntime * runtime
ListBaseT< WorkSpaceLayout > layouts
ListBaseT< struct WorkSpaceDataRelation > hook_layout_relations
AssetLibraryReference asset_library_ref
struct Scene * sequencer_scene
ListBaseT< wmOwnerID > owner_ids
ListBaseT< bToolRef > tools
ebToolRef_Runtime_Flag flag
struct bToolRef * prev
struct bToolRef * next
bToolRef_Runtime * runtime
struct wmOwnerID * next
struct wmOwnerID * prev