Blender  V3.3
rna_workspace.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "RNA_define.h"
8 #include "RNA_enum_types.h"
9 #include "RNA_types.h"
10 
11 #include "BKE_workspace.h"
12 
13 #include "ED_render.h"
14 
15 #include "RE_engine.h"
16 
17 #include "WM_api.h"
18 #include "WM_types.h"
19 
20 #include "rna_internal.h"
21 
22 #include "DNA_workspace_types.h"
23 
24 #ifdef RNA_RUNTIME
25 
26 # include "BLI_listbase.h"
27 
28 # include "BKE_global.h"
29 
30 # include "DNA_object_types.h"
31 # include "DNA_screen_types.h"
32 # include "DNA_space_types.h"
33 
34 # include "ED_asset.h"
35 # include "ED_paint.h"
36 
37 # include "RNA_access.h"
38 
39 # include "WM_toolsystem.h"
40 
41 static void rna_window_update_all(Main *UNUSED(bmain),
42  Scene *UNUSED(scene),
44 {
46 }
47 
48 void rna_workspace_screens_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
49 {
50  WorkSpace *workspace = (WorkSpace *)ptr->owner_id;
51  rna_iterator_listbase_begin(iter, &workspace->layouts, NULL);
52 }
53 
54 static PointerRNA rna_workspace_screens_item_get(CollectionPropertyIterator *iter)
55 {
57  bScreen *screen = BKE_workspace_layout_screen_get(layout);
58 
59  return rna_pointer_inherit_refine(&iter->parent, &RNA_Screen, screen);
60 }
61 
62 /* workspace.owner_ids */
63 
64 static wmOwnerID *rna_WorkSpace_owner_ids_new(WorkSpace *workspace, const char *name)
65 {
66  wmOwnerID *owner_id = MEM_callocN(sizeof(*owner_id), __func__);
67  BLI_addtail(&workspace->owner_ids, owner_id);
68  BLI_strncpy(owner_id->name, name, sizeof(owner_id->name));
70  return owner_id;
71 }
72 
73 static void rna_WorkSpace_owner_ids_remove(WorkSpace *workspace,
74  ReportList *reports,
75  PointerRNA *wstag_ptr)
76 {
77  wmOwnerID *owner_id = wstag_ptr->data;
78  if (BLI_remlink_safe(&workspace->owner_ids, owner_id) == false) {
79  BKE_reportf(reports,
80  RPT_ERROR,
81  "wmOwnerID '%s' not in workspace '%s'",
82  owner_id->name,
83  workspace->id.name + 2);
84  return;
85  }
86 
87  MEM_freeN(owner_id);
88  RNA_POINTER_INVALIDATE(wstag_ptr);
89 
91 }
92 
93 static void rna_WorkSpace_owner_ids_clear(WorkSpace *workspace)
94 {
95  BLI_freelistN(&workspace->owner_ids);
97 }
98 
99 static int rna_WorkSpace_asset_library_get(PointerRNA *ptr)
100 {
101  const WorkSpace *workspace = ptr->data;
103 }
104 
105 static void rna_WorkSpace_asset_library_set(PointerRNA *ptr, int value)
106 {
107  WorkSpace *workspace = ptr->data;
109 }
110 
111 static bToolRef *rna_WorkSpace_tools_from_tkey(WorkSpace *workspace,
112  const bToolKey *tkey,
113  bool create)
114 {
115  if (create) {
116  bToolRef *tref;
117  WM_toolsystem_ref_ensure(workspace, tkey, &tref);
118  return tref;
119  }
120  return WM_toolsystem_ref_find(workspace, tkey);
121 }
122 
123 static bToolRef *rna_WorkSpace_tools_from_space_view3d_mode(WorkSpace *workspace,
124  int mode,
125  bool create)
126 {
127  return rna_WorkSpace_tools_from_tkey(workspace,
128  &(bToolKey){
129  .space_type = SPACE_VIEW3D,
130  .mode = mode,
131  },
132  create);
133 }
134 
135 static bToolRef *rna_WorkSpace_tools_from_space_image_mode(WorkSpace *workspace,
136  int mode,
137  bool create)
138 {
139  return rna_WorkSpace_tools_from_tkey(workspace,
140  &(bToolKey){
141  .space_type = SPACE_IMAGE,
142  .mode = mode,
143  },
144  create);
145 }
146 
147 static bToolRef *rna_WorkSpace_tools_from_space_node(WorkSpace *workspace, bool create)
148 {
149  return rna_WorkSpace_tools_from_tkey(workspace,
150  &(bToolKey){
151  .space_type = SPACE_NODE,
152  .mode = 0,
153  },
154  create);
155 }
156 static bToolRef *rna_WorkSpace_tools_from_space_sequencer(WorkSpace *workspace,
157  int mode,
158  bool create)
159 {
160  return rna_WorkSpace_tools_from_tkey(workspace,
161  &(bToolKey){
162  .space_type = SPACE_SEQ,
163  .mode = mode,
164  },
165  create);
166 }
167 const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext *UNUSED(C),
168  PointerRNA *ptr,
169  PropertyRNA *UNUSED(prop),
170  bool *UNUSED(r_free))
171 {
172  bToolRef *tref = ptr->data;
173  switch (tref->space_type) {
174  case SPACE_VIEW3D:
176  case SPACE_IMAGE:
178  case SPACE_SEQ:
180  }
181  return DummyRNA_DEFAULT_items;
182 }
183 
184 static bool rna_WorkSpaceTool_use_paint_canvas_get(PointerRNA *ptr)
185 {
186  bToolRef *tref = ptr->data;
187  return ED_paint_tool_use_canvas(NULL, tref);
188 }
189 
190 static int rna_WorkSpaceTool_index_get(PointerRNA *ptr)
191 {
192  bToolRef *tref = ptr->data;
193  return (tref->runtime) ? tref->runtime->index : 0;
194 }
195 
196 static int rna_WorkSpaceTool_has_datablock_get(PointerRNA *ptr)
197 {
198  bToolRef *tref = ptr->data;
199  return (tref->runtime) ? (tref->runtime->data_block[0] != '\0') : false;
200 }
201 
202 static void rna_WorkSpaceTool_widget_get(PointerRNA *ptr, char *value)
203 {
204  bToolRef *tref = ptr->data;
205  strcpy(value, tref->runtime ? tref->runtime->gizmo_group : "");
206 }
207 
208 static int rna_WorkSpaceTool_widget_length(PointerRNA *ptr)
209 {
210  bToolRef *tref = ptr->data;
211  return tref->runtime ? strlen(tref->runtime->gizmo_group) : 0;
212 }
213 
214 #else /* RNA_RUNTIME */
215 
217 {
218  StructRNA *srna;
219  PropertyRNA *prop;
220 
221  srna = RNA_def_struct(brna, "wmOwnerID", NULL);
222  RNA_def_struct_sdna(srna, "wmOwnerID");
224  RNA_def_struct_ui_text(srna, "Work Space UI Tag", "");
225 
226  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
227  RNA_def_property_ui_text(prop, "Name", "");
228  RNA_def_struct_name_property(srna, prop);
229 }
230 
232 {
233  StructRNA *srna;
234 
235  FunctionRNA *func;
236  PropertyRNA *parm;
237 
238  RNA_def_property_srna(cprop, "wmOwnerIDs");
239  srna = RNA_def_struct(brna, "wmOwnerIDs", NULL);
240  RNA_def_struct_sdna(srna, "WorkSpace");
241  RNA_def_struct_ui_text(srna, "WorkSpace UI Tags", "");
242 
243  /* add owner_id */
244  func = RNA_def_function(srna, "new", "rna_WorkSpace_owner_ids_new");
245  RNA_def_function_ui_description(func, "Add ui tag");
246  parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the tag");
248  /* return type */
249  parm = RNA_def_pointer(func, "owner_id", "wmOwnerID", "", "");
250  RNA_def_function_return(func, parm);
251 
252  /* remove owner_id */
253  func = RNA_def_function(srna, "remove", "rna_WorkSpace_owner_ids_remove");
255  RNA_def_function_ui_description(func, "Remove ui tag");
256  /* owner_id to remove */
257  parm = RNA_def_pointer(func, "owner_id", "wmOwnerID", "", "Tag to remove");
260 
261  /* clear all modifiers */
262  func = RNA_def_function(srna, "clear", "rna_WorkSpace_owner_ids_clear");
263  RNA_def_function_ui_description(func, "Remove all tags");
264 }
265 
267 {
268  StructRNA *srna;
269  PropertyRNA *prop;
270 
271  srna = RNA_def_struct(brna, "WorkSpaceTool", NULL);
272  RNA_def_struct_sdna(srna, "bToolRef");
274  RNA_def_struct_ui_text(srna, "Work Space Tool", "");
275 
276  prop = RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE);
277  RNA_def_property_ui_text(prop, "Identifier", "");
278  RNA_def_struct_name_property(srna, prop);
279 
280  prop = RNA_def_property(srna, "idname_fallback", PROP_STRING, PROP_NONE);
281  RNA_def_property_ui_text(prop, "Identifier Fallback", "");
282 
283  prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
285  RNA_def_property_ui_text(prop, "Index", "");
286  RNA_def_property_int_funcs(prop, "rna_WorkSpaceTool_index_get", NULL, NULL);
287 
288  prop = RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
289  RNA_def_property_enum_sdna(prop, NULL, "space_type");
292  RNA_def_property_ui_text(prop, "Space Type", "");
293 
294  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
295  RNA_def_property_enum_sdna(prop, NULL, "mode");
297  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_WorkSpace_tools_mode_itemf");
298  RNA_def_property_ui_text(prop, "Tool Mode", "");
300 
301  prop = RNA_def_property(srna, "use_paint_canvas", PROP_BOOLEAN, PROP_NONE);
303  RNA_def_property_ui_text(prop, "Index", "");
304  RNA_def_property_boolean_funcs(prop, "rna_WorkSpaceTool_use_paint_canvas_get", NULL);
305  RNA_def_property_ui_text(prop, "Use Paint Canvas", "Does this tool use an painting canvas");
306 
308  prop = RNA_def_property(srna, "has_datablock", PROP_BOOLEAN, PROP_NONE);
310  RNA_def_property_ui_text(prop, "Has Data-Block", "");
311  RNA_def_property_boolean_funcs(prop, "rna_WorkSpaceTool_has_datablock_get", NULL);
313 
314  prop = RNA_def_property(srna, "widget", PROP_STRING, PROP_NONE);
316  RNA_def_property_ui_text(prop, "Widget", "");
318  prop, "rna_WorkSpaceTool_widget_get", "rna_WorkSpaceTool_widget_length", NULL);
319 
321 }
322 
324 {
325  StructRNA *srna;
326 
327  FunctionRNA *func;
328  PropertyRNA *parm;
329 
330  RNA_def_property_srna(cprop, "wmTools");
331  srna = RNA_def_struct(brna, "wmTools", NULL);
332  RNA_def_struct_sdna(srna, "WorkSpace");
333  RNA_def_struct_ui_text(srna, "WorkSpace UI Tags", "");
334 
335  /* add owner_id */
336  func = RNA_def_function(
337  srna, "from_space_view3d_mode", "rna_WorkSpace_tools_from_space_view3d_mode");
339  parm = RNA_def_enum(func, "mode", rna_enum_context_mode_items, 0, "", "");
341  RNA_def_boolean(func, "create", false, "Create", "");
342  /* return type */
343  parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
344  RNA_def_function_return(func, parm);
345 
346  func = RNA_def_function(
347  srna, "from_space_image_mode", "rna_WorkSpace_tools_from_space_image_mode");
349  parm = RNA_def_enum(func, "mode", rna_enum_space_image_mode_all_items, 0, "", "");
351  RNA_def_boolean(func, "create", false, "Create", "");
352  /* return type */
353  parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
354  RNA_def_function_return(func, parm);
355 
356  func = RNA_def_function(srna, "from_space_node", "rna_WorkSpace_tools_from_space_node");
358  RNA_def_boolean(func, "create", false, "Create", "");
359  /* return type */
360  parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
361  RNA_def_function_return(func, parm);
362 
363  func = RNA_def_function(
364  srna, "from_space_sequencer", "rna_WorkSpace_tools_from_space_sequencer");
366  parm = RNA_def_enum(func, "mode", rna_enum_space_sequencer_view_type_items, 0, "", "");
368  RNA_def_boolean(func, "create", false, "Create", "");
369  /* return type */
370  parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
371  RNA_def_function_return(func, parm);
372 }
373 
374 static void rna_def_workspace(BlenderRNA *brna)
375 {
376  StructRNA *srna;
377  PropertyRNA *prop;
378 
379  srna = RNA_def_struct(brna, "WorkSpace", "ID");
380  RNA_def_struct_sdna(srna, "WorkSpace");
382  srna, "Workspace", "Workspace data-block, defining the working environment for the user");
383  /* TODO: real icon, just to show something */
384  RNA_def_struct_ui_icon(srna, ICON_WORKSPACE);
385 
386  prop = RNA_def_property(srna, "screens", PROP_COLLECTION, PROP_NONE);
387  RNA_def_property_collection_sdna(prop, NULL, "layouts", NULL);
388  RNA_def_property_struct_type(prop, "Screen");
390  "rna_workspace_screens_begin",
391  NULL,
392  NULL,
393  "rna_workspace_screens_item_get",
394  NULL,
395  NULL,
396  NULL,
397  NULL);
398  RNA_def_property_ui_text(prop, "Screens", "Screen layouts of a workspace");
399 
400  prop = RNA_def_property(srna, "owner_ids", PROP_COLLECTION, PROP_NONE);
401  RNA_def_property_struct_type(prop, "wmOwnerID");
402  RNA_def_property_ui_text(prop, "UI Tags", "");
403  rna_def_workspace_owner_ids(brna, prop);
404 
405  prop = RNA_def_property(srna, "tools", PROP_COLLECTION, PROP_NONE);
406  RNA_def_property_collection_sdna(prop, NULL, "tools", NULL);
407  RNA_def_property_struct_type(prop, "WorkSpaceTool");
408  RNA_def_property_ui_text(prop, "Tools", "");
409  rna_def_workspace_tools(brna, prop);
410 
411  prop = RNA_def_property(srna, "object_mode", PROP_ENUM, PROP_NONE);
414  prop, "Object Mode", "Switch to this object mode when activating the workspace");
415 
416  prop = RNA_def_property(srna, "use_pin_scene", PROP_BOOLEAN, PROP_NONE);
419  "Pin Scene",
420  "Remember the last used scene for the workspace and switch to it "
421  "whenever this workspace is activated again");
423 
424  /* Flags */
425  prop = RNA_def_property(srna, "use_filter_by_owner", PROP_BOOLEAN, PROP_NONE);
428  RNA_def_property_ui_text(prop, "Use UI Tags", "Filter the UI by tags");
429  RNA_def_property_update(prop, 0, "rna_window_update_all");
430 
432  srna, "rna_WorkSpace_asset_library_get", "rna_WorkSpace_asset_library_set");
434  "Asset Library",
435  "Active asset library to show in the UI, not used by the Asset Browser "
436  "(which has its own active asset library)");
438 
439  RNA_api_workspace(srna);
440 }
441 
443 {
446 
447  rna_def_workspace(brna);
448 }
449 
450 #endif /* RNA_RUNTIME */
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
struct bScreen * BKE_workspace_layout_screen_get(const struct WorkSpaceLayout *layout) GETTER_ATTRS
bool BLI_remlink_safe(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:123
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
Definition: listbase.c:466
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:80
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
#define UNUSED(x)
Object is a sort of wrapper for general info.
@ SPACE_NODE
@ SPACE_SEQ
@ SPACE_IMAGE
@ SPACE_VIEW3D
@ WORKSPACE_USE_FILTER_BY_ORIGIN
@ WORKSPACE_USE_PIN_SCENE
int ED_asset_library_reference_to_enum_value(const AssetLibraryReference *library)
AssetLibraryReference ED_asset_library_reference_from_enum_value(int value)
bool ED_paint_tool_use_canvas(struct bContext *C, struct bToolRef *tref)
#define RNA_POINTER_INVALIDATE(ptr)
Definition: RNA_access.h:744
@ PARM_RNAPTR
Definition: RNA_types.h:354
@ PARM_REQUIRED
Definition: RNA_types.h:352
@ FUNC_USE_REPORTS
Definition: RNA_types.h:663
@ STRUCT_UNDO
Definition: RNA_types.h:708
@ PROP_BOOLEAN
Definition: RNA_types.h:59
@ PROP_ENUM
Definition: RNA_types.h:63
@ PROP_INT
Definition: RNA_types.h:60
@ PROP_STRING
Definition: RNA_types.h:62
@ PROP_COLLECTION
Definition: RNA_types.h:65
@ PROP_THICK_WRAP
Definition: RNA_types.h:285
@ PROP_ANIMATABLE
Definition: RNA_types.h:202
@ PROP_EDITABLE
Definition: RNA_types.h:189
@ PROP_NEVER_NULL
Definition: RNA_types.h:239
@ PROP_NONE
Definition: RNA_types.h:126
#define C
Definition: RandGen.cpp:25
#define ND_ASSET_LIST_READING
Definition: WM_types.h:491
#define NC_WINDOW
Definition: WM_types.h:325
#define ND_MODIFIER
Definition: WM_types.h:411
#define NC_WORKSPACE
Definition: WM_types.h:326
#define NC_ASSET
Definition: WM_types.h:354
#define NA_REMOVED
Definition: WM_types.h:526
#define NC_OBJECT
Definition: WM_types.h:329
Scene scene
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:31
std::unique_ptr< IDProperty, IDPropertyDeleter > create(StringRefNull prop_name, int32_t value)
Allocate a new IDProperty of type IDP_INT, set its name and value.
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
Definition: rna_access.c:4729
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
Definition: rna_access.c:186
void * rna_iterator_listbase_get(CollectionPropertyIterator *iter)
Definition: rna_access.c:4761
PropertyRNA * rna_def_asset_library_reference_common(struct StructRNA *srna, const char *get, const char *set)
Definition: rna_asset.c:482
const EnumPropertyItem rna_enum_context_mode_items[]
Definition: rna_context.c:21
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4170
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
Definition: rna_define.c:2236
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1526
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
Definition: rna_define.c:3285
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
Definition: rna_define.c:4312
void RNA_define_verify_sdna(bool verify)
Definition: rna_define.c:737
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1645
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
Definition: rna_define.c:4273
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
Definition: rna_define.c:3474
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
Definition: rna_define.c:3420
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1237
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
Definition: rna_define.c:2944
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1872
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
Definition: rna_define.c:1048
void RNA_def_struct_clear_flag(StructRNA *srna, int flag)
Definition: rna_define.c:1138
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
Definition: rna_define.c:1772
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
Definition: rna_define.c:2769
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
Definition: rna_define.c:4347
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
Definition: rna_define.c:2900
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
Definition: rna_define.c:3224
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1257
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
Definition: rna_define.c:1103
void RNA_def_function_flag(FunctionRNA *func, int flag)
Definition: rna_define.c:4342
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1495
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1028
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2601
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3028
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
Definition: rna_define.c:1245
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3687
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3783
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1518
void RNA_api_workspace(struct StructRNA *srna)
void RNA_api_workspace_tool(struct StructRNA *srna)
const EnumPropertyItem rna_enum_workspace_object_mode_items[]
Definition: rna_object.c:92
const EnumPropertyItem DummyRNA_DEFAULT_items[]
Definition: rna_rna.c:31
const EnumPropertyItem rna_enum_space_type_items[]
Definition: rna_space.c:86
const EnumPropertyItem rna_enum_space_sequencer_view_type_items[]
Definition: rna_space.c:191
const EnumPropertyItem rna_enum_space_image_mode_all_items[]
Definition: rna_space.c:297
static void rna_def_workspace_tool(BlenderRNA *brna)
static void rna_def_workspace_owner_ids(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_workspace_tools(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_workspace_owner(BlenderRNA *brna)
void RNA_def_workspace(BlenderRNA *brna)
static void rna_def_workspace(BlenderRNA *brna)
char name[66]
Definition: DNA_ID.h:378
Definition: BKE_main.h:121
void * data
Definition: RNA_types.h:38
struct ID * owner_id
Definition: RNA_types.h:36
Wrapper for bScreen.
AssetLibraryReference asset_library_ref
ListBase owner_ids
bToolRef_Runtime * runtime
void WM_main_add_notifier(unsigned int type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3480
bToolRef * WM_toolsystem_ref_find(WorkSpace *workspace, const bToolKey *tkey)
Definition: wm_toolsystem.c:83
bool WM_toolsystem_ref_ensure(struct WorkSpace *workspace, const bToolKey *tkey, bToolRef **r_tref)