Blender V5.0
rna_workspace.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "RNA_define.hh"
10#include "RNA_enum_types.hh"
11#include "RNA_types.hh"
12
13#include "WM_api.hh"
14#include "WM_types.hh"
15
16#include "rna_internal.hh"
17
18#include "DNA_workspace_types.h"
19
20#ifdef RNA_RUNTIME
21
22# include "BLI_listbase.h"
23# include "BLI_string.h"
24
25# include "BKE_global.hh"
26# include "BKE_paint.hh"
27# include "BKE_paint_types.hh"
28# include "BKE_report.hh"
29# include "BKE_workspace.hh"
30
31# include "DNA_screen_types.h"
32# include "DNA_space_types.h"
33
34# include "ED_asset.hh"
35# include "ED_paint.hh"
36# include "ED_sequencer.hh"
37
38# include "RNA_access.hh"
39
40# include "WM_toolsystem.hh"
41
42static void rna_window_update_all(Main * /*bmain*/, Scene * /*scene*/, PointerRNA * /*ptr*/)
43{
45}
46
47void rna_workspace_screens_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
48{
49 WorkSpace *workspace = (WorkSpace *)ptr->owner_id;
50 rna_iterator_listbase_begin(iter, ptr, &workspace->layouts, nullptr);
51}
52
53static PointerRNA rna_workspace_screens_item_get(CollectionPropertyIterator *iter)
54{
55 WorkSpaceLayout *layout = static_cast<WorkSpaceLayout *>(rna_iterator_listbase_get(iter));
57
58 return RNA_id_pointer_create(reinterpret_cast<ID *>(screen));
59}
60
61/* workspace.owner_ids */
62
63static wmOwnerID *rna_WorkSpace_owner_ids_new(WorkSpace *workspace, const char *name)
64{
65 wmOwnerID *owner_id = MEM_callocN<wmOwnerID>(__func__);
66 BLI_addtail(&workspace->owner_ids, owner_id);
67 STRNCPY(owner_id->name, name);
69 return owner_id;
70}
71
72static void rna_WorkSpace_owner_ids_remove(WorkSpace *workspace,
73 ReportList *reports,
74 PointerRNA *wstag_ptr)
75{
76 wmOwnerID *owner_id = static_cast<wmOwnerID *>(wstag_ptr->data);
77 if (BLI_remlink_safe(&workspace->owner_ids, owner_id) == false) {
78 BKE_reportf(reports,
80 "wmOwnerID '%s' not in workspace '%s'",
81 owner_id->name,
82 workspace->id.name + 2);
83 return;
84 }
85
86 MEM_freeN(owner_id);
87 wstag_ptr->invalidate();
88
90}
91
92static void rna_WorkSpace_owner_ids_clear(WorkSpace *workspace)
93{
94 BLI_freelistN(&workspace->owner_ids);
96}
97
98static int rna_WorkSpace_asset_library_get(PointerRNA *ptr)
99{
100 const WorkSpace *workspace = static_cast<WorkSpace *>(ptr->data);
102}
103
104static void rna_WorkSpace_asset_library_set(PointerRNA *ptr, int value)
105{
106 WorkSpace *workspace = static_cast<WorkSpace *>(ptr->data);
108}
109
110static bToolRef *rna_WorkSpace_tools_from_tkey(WorkSpace *workspace,
111 const bToolKey *tkey,
112 bool create)
113{
114 if (create) {
115 bToolRef *tref;
116 WM_toolsystem_ref_ensure(workspace, tkey, &tref);
117 return tref;
118 }
119 return WM_toolsystem_ref_find(workspace, tkey);
120}
121
122static bToolRef *rna_WorkSpace_tools_from_space_view3d_mode(WorkSpace *workspace,
123 int mode,
124 bool create)
125{
126 bToolKey key{};
128 key.mode = mode;
129 return rna_WorkSpace_tools_from_tkey(workspace, &key, create);
130}
131
132static bToolRef *rna_WorkSpace_tools_from_space_image_mode(WorkSpace *workspace,
133 int mode,
134 bool create)
135{
136 bToolKey key{};
138 key.mode = mode;
139 return rna_WorkSpace_tools_from_tkey(workspace, &key, create);
140}
141
142static bToolRef *rna_WorkSpace_tools_from_space_node(WorkSpace *workspace, bool create)
143{
144 bToolKey key{};
146 key.mode = 0;
147 return rna_WorkSpace_tools_from_tkey(workspace, &key, create);
148}
149static bToolRef *rna_WorkSpace_tools_from_space_sequencer(WorkSpace *workspace,
150 int mode,
151 bool create)
152{
153 bToolKey key{};
154 key.space_type = SPACE_SEQ;
155 key.mode = mode;
156 return rna_WorkSpace_tools_from_tkey(workspace, &key, create);
157}
158const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext * /*C*/,
160 PropertyRNA * /*prop*/,
161 bool * /*r_free*/)
162{
163 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
164 switch (tref->space_type) {
165 case SPACE_VIEW3D:
167 case SPACE_IMAGE:
169 case SPACE_SEQ:
171 }
173}
174
175static bool rna_WorkSpaceTool_use_paint_canvas_get(PointerRNA *ptr)
176{
177 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
178 return ED_image_paint_brush_type_use_canvas(nullptr, tref);
179}
180
181static int rna_WorkSpaceTool_index_get(PointerRNA *ptr)
182{
183 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
184 return (tref->runtime) ? tref->runtime->index : 0;
185}
186
187static bool rna_WorkSpaceTool_has_datablock_get(PointerRNA *ptr)
188{
189 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
190 return (tref->runtime) ? (tref->runtime->data_block[0] != '\0') : false;
191}
192
193static bool rna_WorkSpaceTool_use_brushes_get(PointerRNA *ptr)
194{
195 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
196 return (tref->runtime) ? ((tref->runtime->flag & TOOLREF_FLAG_USE_BRUSHES) != 0) : false;
197}
198
199static int rna_WorkSpaceTool_brush_type_get(PointerRNA *ptr)
200{
201 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
202 return tref->runtime ? tref->runtime->brush_type : -1;
203}
204
207 PropertyRNA * /*prop*/,
208 bool *r_free)
209{
210
211 PaintMode paint_mode = [&]() {
212 if (ptr->type == &RNA_WorkSpaceTool) {
213 const bToolRef *tref = static_cast<bToolRef *>(ptr->data);
214 return BKE_paintmode_get_from_tool(tref);
215 }
217 }();
218
219 EnumPropertyItem *items = nullptr;
220 int totitem = 0;
221
222 EnumPropertyItem unset_item = {
223 -1, "ANY", 0, "Any", "Do not limit this tool to a specific brush type"};
224 RNA_enum_item_add(&items, &totitem, &unset_item);
225
226 if (paint_mode != PaintMode::Invalid) {
227 const EnumPropertyItem *valid_items = BKE_paint_get_tool_enum_from_paintmode(paint_mode);
228 RNA_enum_items_add(&items, &totitem, valid_items);
229 }
230
231 RNA_enum_item_end(&items, &totitem);
232
233 *r_free = true;
234 return items;
235}
236
237static void rna_WorkSpaceTool_widget_get(PointerRNA *ptr, char *value)
238{
239 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
240 strcpy(value, tref->runtime ? tref->runtime->gizmo_group : "");
241}
242
243static int rna_WorkSpaceTool_widget_length(PointerRNA *ptr)
244{
245 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
246 return tref->runtime ? strlen(tref->runtime->gizmo_group) : 0;
247}
248
249static void rna_workspace_sync_scene_time_update(bContext *C, PointerRNA * /*ptr*/)
250{
252}
253
254#else /* RNA_RUNTIME */
255
257{
258 StructRNA *srna;
259 PropertyRNA *prop;
260
261 srna = RNA_def_struct(brna, "wmOwnerID", nullptr);
262 RNA_def_struct_sdna(srna, "wmOwnerID");
263 RNA_def_struct_ui_text(srna, "Work Space UI Tag", "");
264
265 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
266 RNA_def_property_ui_text(prop, "Name", "");
268}
269
271{
272 StructRNA *srna;
273
274 FunctionRNA *func;
275 PropertyRNA *parm;
276
277 RNA_def_property_srna(cprop, "wmOwnerIDs");
278 srna = RNA_def_struct(brna, "wmOwnerIDs", nullptr);
279 RNA_def_struct_sdna(srna, "WorkSpace");
280 RNA_def_struct_ui_text(srna, "WorkSpace UI Tags", "");
281
282 /* add owner_id */
283 func = RNA_def_function(srna, "new", "rna_WorkSpace_owner_ids_new");
284 RNA_def_function_ui_description(func, "Add ui tag");
285 parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the tag");
287 /* return type */
288 parm = RNA_def_pointer(func, "owner_id", "wmOwnerID", "", "");
289 RNA_def_function_return(func, parm);
290
291 /* remove owner_id */
292 func = RNA_def_function(srna, "remove", "rna_WorkSpace_owner_ids_remove");
294 RNA_def_function_ui_description(func, "Remove ui tag");
295 /* owner_id to remove */
296 parm = RNA_def_pointer(func, "owner_id", "wmOwnerID", "", "Tag to remove");
299
300 /* clear all modifiers */
301 func = RNA_def_function(srna, "clear", "rna_WorkSpace_owner_ids_clear");
302 RNA_def_function_ui_description(func, "Remove all tags");
303}
304
306{
307 StructRNA *srna;
308 PropertyRNA *prop;
309
310 srna = RNA_def_struct(brna, "WorkSpaceTool", nullptr);
311 RNA_def_struct_sdna(srna, "bToolRef");
312 RNA_def_struct_ui_text(srna, "Work Space Tool", "");
313
314 prop = RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE);
315 RNA_def_property_ui_text(prop, "Identifier", "");
317
318 prop = RNA_def_property(srna, "idname_fallback", PROP_STRING, PROP_NONE);
319 RNA_def_property_ui_text(prop, "Identifier Fallback", "");
320
321 prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
323 RNA_def_property_ui_text(prop, "Index", "");
324 RNA_def_property_int_funcs(prop, "rna_WorkSpaceTool_index_get", nullptr, nullptr);
325
326 prop = RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
327 RNA_def_property_enum_sdna(prop, nullptr, "space_type");
330 RNA_def_property_ui_text(prop, "Space Type", "");
331
332 prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
333 RNA_def_property_enum_sdna(prop, nullptr, "mode");
335 RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_WorkSpace_tools_mode_itemf");
336 RNA_def_property_ui_text(prop, "Tool Mode", "");
338
339 prop = RNA_def_property(srna, "use_paint_canvas", PROP_BOOLEAN, PROP_NONE);
341 RNA_def_property_ui_text(prop, "Index", "");
342 RNA_def_property_boolean_funcs(prop, "rna_WorkSpaceTool_use_paint_canvas_get", nullptr);
343 RNA_def_property_ui_text(prop, "Use Paint Canvas", "Does this tool use a painting canvas");
344
346
347 prop = RNA_def_property(srna, "has_datablock", PROP_BOOLEAN, PROP_NONE);
349 RNA_def_property_ui_text(prop, "Has Data-Block", "");
350 RNA_def_property_boolean_funcs(prop, "rna_WorkSpaceTool_has_datablock_get", nullptr);
351
352 prop = RNA_def_property(srna, "use_brushes", PROP_BOOLEAN, PROP_NONE);
354 RNA_def_property_ui_text(prop, "Uses Brushes", "");
355 RNA_def_property_boolean_funcs(prop, "rna_WorkSpaceTool_use_brushes_get", nullptr);
356
357 prop = RNA_def_property(srna, "brush_type", PROP_ENUM, PROP_NONE);
360 "Brush Type",
361 "If the tool uses brushes and is limited to a specific brush type, the "
362 "identifier of the brush type");
365 prop, "rna_WorkSpaceTool_brush_type_get", nullptr, "rna_WorkSpaceTool_brush_type_itemf");
366
368
369 prop = RNA_def_property(srna, "widget", PROP_STRING, PROP_NONE);
371 RNA_def_property_ui_text(prop, "Widget", "");
373 prop, "rna_WorkSpaceTool_widget_get", "rna_WorkSpaceTool_widget_length", nullptr);
374
376}
377
379{
380 StructRNA *srna;
381
382 FunctionRNA *func;
383 PropertyRNA *parm;
384
385 RNA_def_property_srna(cprop, "wmTools");
386 srna = RNA_def_struct(brna, "wmTools", nullptr);
387 RNA_def_struct_sdna(srna, "WorkSpace");
388 RNA_def_struct_ui_text(srna, "WorkSpace UI Tags", "");
389
390 /* add owner_id */
391 func = RNA_def_function(
392 srna, "from_space_view3d_mode", "rna_WorkSpace_tools_from_space_view3d_mode");
394 parm = RNA_def_enum(func, "mode", rna_enum_context_mode_items, 0, "", "");
396 RNA_def_boolean(func, "create", false, "Create", "");
397 /* return type */
398 parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
399 RNA_def_function_return(func, parm);
400
401 func = RNA_def_function(
402 srna, "from_space_image_mode", "rna_WorkSpace_tools_from_space_image_mode");
404 parm = RNA_def_enum(func, "mode", rna_enum_space_image_mode_all_items, 0, "", "");
406 RNA_def_boolean(func, "create", false, "Create", "");
407 /* return type */
408 parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
409 RNA_def_function_return(func, parm);
410
411 func = RNA_def_function(srna, "from_space_node", "rna_WorkSpace_tools_from_space_node");
413 RNA_def_boolean(func, "create", false, "Create", "");
414 /* return type */
415 parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
416 RNA_def_function_return(func, parm);
417
418 func = RNA_def_function(
419 srna, "from_space_sequencer", "rna_WorkSpace_tools_from_space_sequencer");
421 parm = RNA_def_enum(func, "mode", rna_enum_space_sequencer_view_type_items, 0, "", "");
423 RNA_def_boolean(func, "create", false, "Create", "");
424 /* return type */
425 parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
426 RNA_def_function_return(func, parm);
427}
428
430{
431 StructRNA *srna;
432 PropertyRNA *prop;
433
434 srna = RNA_def_struct(brna, "WorkSpace", "ID");
435 RNA_def_struct_sdna(srna, "WorkSpace");
437 srna, "Workspace", "Workspace data-block, defining the working environment for the user");
438 /* TODO: real icon, just to show something */
439 RNA_def_struct_ui_icon(srna, ICON_WORKSPACE);
440
441 prop = RNA_def_property(srna, "screens", PROP_COLLECTION, PROP_NONE);
442 RNA_def_property_collection_sdna(prop, nullptr, "layouts", nullptr);
443 RNA_def_property_struct_type(prop, "Screen");
445 "rna_workspace_screens_begin",
446 nullptr,
447 nullptr,
448 "rna_workspace_screens_item_get",
449 nullptr,
450 nullptr,
451 nullptr,
452 nullptr);
453 RNA_def_property_ui_text(prop, "Screens", "Screen layouts of a workspace");
454
455 prop = RNA_def_property(srna, "owner_ids", PROP_COLLECTION, PROP_NONE);
456 RNA_def_property_struct_type(prop, "wmOwnerID");
457 RNA_def_property_ui_text(prop, "UI Tags", "");
458 rna_def_workspace_owner_ids(brna, prop);
459
460 prop = RNA_def_property(srna, "tools", PROP_COLLECTION, PROP_NONE);
461 RNA_def_property_collection_sdna(prop, nullptr, "tools", nullptr);
462 RNA_def_property_struct_type(prop, "WorkSpaceTool");
463 RNA_def_property_ui_text(prop, "Tools", "");
464 rna_def_workspace_tools(brna, prop);
465
466 prop = RNA_def_property(srna, "object_mode", PROP_ENUM, PROP_NONE);
469 prop, "Object Mode", "Switch to this object mode when activating the workspace");
470
471 prop = RNA_def_property(srna, "use_pin_scene", PROP_BOOLEAN, PROP_NONE);
474 "Pin Scene",
475 "Remember the last used scene for the workspace and switch to it "
476 "whenever this workspace is activated again");
478
479 /* Flags */
480 prop = RNA_def_property(srna, "use_filter_by_owner", PROP_BOOLEAN, PROP_NONE);
483 RNA_def_property_ui_text(prop, "Use UI Tags", "Filter the UI by tags");
484 RNA_def_property_update(prop, 0, "rna_window_update_all");
485
487 srna, "rna_WorkSpace_asset_library_get", "rna_WorkSpace_asset_library_set");
489 "Asset Library",
490 "Active asset library to show in the UI, not used by the Asset Browser "
491 "(which has its own active asset library)");
493
494 prop = RNA_def_property(srna, "sequencer_scene", PROP_POINTER, PROP_NONE);
495 RNA_def_property_pointer_sdna(prop, nullptr, "sequencer_scene");
496 RNA_def_property_ui_text(prop, "Sequencer Scene", "");
498 RNA_def_property_update(prop, 0, "rna_window_update_all");
499
500 prop = RNA_def_property(srna, "use_scene_time_sync", PROP_BOOLEAN, PROP_NONE);
503 prop, "Sync Active Scene", "Set the active scene and time based on the current scene strip");
505 RNA_def_property_update(prop, NC_WINDOW, "rna_workspace_sync_scene_time_update");
506
507 RNA_api_workspace(srna);
508}
509
511{
514
515 rna_def_workspace(brna);
516}
517
518#endif /* RNA_RUNTIME */
const EnumPropertyItem * BKE_paint_get_tool_enum_from_paintmode(PaintMode mode)
Definition paint.cc:409
PaintMode BKE_paintmode_get_active_from_context(const bContext *C)
Definition paint.cc:505
PaintMode BKE_paintmode_get_from_tool(const bToolRef *tref)
Definition paint.cc:561
PaintMode
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
@ RPT_ERROR
Definition BKE_report.hh:39
bScreen * BKE_workspace_layout_screen_get(const WorkSpaceLayout *layout) GETTER_ATTRS
Definition workspace.cc:639
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
Definition listbase.cc:497
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
bool BLI_remlink_safe(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:154
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:693
@ SPACE_NODE
@ SPACE_SEQ
@ SPACE_IMAGE
@ SPACE_VIEW3D
@ WORKSPACE_USE_FILTER_BY_ORIGIN
@ WORKSPACE_SYNC_SCENE_TIME
@ WORKSPACE_USE_PIN_SCENE
@ TOOLREF_FLAG_USE_BRUSHES
bool ED_image_paint_brush_type_use_canvas(bContext *C, bToolRef *tref)
ParameterFlag
Definition RNA_types.hh:544
@ PARM_RNAPTR
Definition RNA_types.hh:547
@ PARM_REQUIRED
Definition RNA_types.hh:545
@ FUNC_USE_REPORTS
Definition RNA_types.hh:914
@ PROP_BOOLEAN
Definition RNA_types.hh:162
@ PROP_ENUM
Definition RNA_types.hh:166
@ PROP_INT
Definition RNA_types.hh:163
@ PROP_STRING
Definition RNA_types.hh:165
@ PROP_POINTER
Definition RNA_types.hh:167
@ PROP_COLLECTION
Definition RNA_types.hh:168
PropertyFlag
Definition RNA_types.hh:300
@ PROP_THICK_WRAP
Definition RNA_types.hh:423
@ PROP_CONTEXT_UPDATE
Definition RNA_types.hh:407
@ PROP_ANIMATABLE
Definition RNA_types.hh:319
@ PROP_EDITABLE
Definition RNA_types.hh:306
@ PROP_NEVER_NULL
Definition RNA_types.hh:377
@ PROP_PTR_NO_OWNERSHIP
Definition RNA_types.hh:395
@ PROP_NONE
Definition RNA_types.hh:233
#define C
Definition RandGen.cpp:29
#define ND_ASSET_LIST_READING
Definition WM_types.hh:550
#define NC_WINDOW
Definition WM_types.hh:375
#define ND_MODIFIER
Definition WM_types.hh:462
#define NC_WORKSPACE
Definition WM_types.hh:376
#define NC_ASSET
Definition WM_types.hh:404
#define NA_REMOVED
Definition WM_types.hh:587
#define NC_OBJECT
Definition WM_types.hh:379
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
int library_reference_to_enum_value(const AssetLibraryReference *library)
AssetLibraryReference library_reference_from_enum_value(int value)
void sync_active_scene_and_time_with_scene_strip(bContext &C)
const char * name
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, ListBase *lb, IteratorSkipFunc skip)
void * rna_iterator_listbase_get(CollectionPropertyIterator *iter)
PointerRNA RNA_id_pointer_create(ID *id)
PropertyRNA * rna_def_asset_library_reference_common(StructRNA *srna, const char *get, const char *set)
Definition rna_asset.cc:687
const EnumPropertyItem rna_enum_context_mode_items[]
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_define_verify_sdna(bool verify)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
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)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
const EnumPropertyItem * rna_WorkSpaceTool_brush_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
void RNA_api_workspace_tool(StructRNA *srna)
void RNA_api_workspace(StructRNA *srna)
const EnumPropertyItem rna_enum_workspace_object_mode_items[]
Definition rna_object.cc:71
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
Definition rna_rna.cc:32
const EnumPropertyItem rna_enum_space_type_items[]
Definition rna_space.cc:73
const EnumPropertyItem rna_enum_space_sequencer_view_type_items[]
Definition rna_space.cc:186
const EnumPropertyItem rna_enum_space_image_mode_all_items[]
Definition rna_space.cc:291
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)
Definition DNA_ID.h:414
char name[258]
Definition DNA_ID.h:432
void invalidate()
Definition RNA_types.hh:110
void * data
Definition RNA_types.hh:53
Wrapper for bScreen.
AssetLibraryReference asset_library_ref
bToolRef_Runtime * runtime
void WM_main_add_notifier(uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4238
bToolRef * WM_toolsystem_ref_find(WorkSpace *workspace, const bToolKey *tkey)
bool WM_toolsystem_ref_ensure(WorkSpace *workspace, const bToolKey *tkey, bToolRef **r_tref)