Blender V4.5
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_report.hh"
28# include "BKE_workspace.hh"
29
30# include "DNA_screen_types.h"
31# include "DNA_space_types.h"
32
33# include "ED_asset.hh"
34# include "ED_paint.hh"
35
36# include "RNA_access.hh"
37
38# include "WM_toolsystem.hh"
39
40static void rna_window_update_all(Main * /*bmain*/, Scene * /*scene*/, PointerRNA * /*ptr*/)
41{
43}
44
45void rna_workspace_screens_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
46{
47 WorkSpace *workspace = (WorkSpace *)ptr->owner_id;
48 rna_iterator_listbase_begin(iter, ptr, &workspace->layouts, nullptr);
49}
50
51static PointerRNA rna_workspace_screens_item_get(CollectionPropertyIterator *iter)
52{
53 WorkSpaceLayout *layout = static_cast<WorkSpaceLayout *>(rna_iterator_listbase_get(iter));
55
56 return RNA_id_pointer_create(reinterpret_cast<ID *>(screen));
57}
58
59/* workspace.owner_ids */
60
61static wmOwnerID *rna_WorkSpace_owner_ids_new(WorkSpace *workspace, const char *name)
62{
63 wmOwnerID *owner_id = MEM_callocN<wmOwnerID>(__func__);
64 BLI_addtail(&workspace->owner_ids, owner_id);
65 STRNCPY(owner_id->name, name);
67 return owner_id;
68}
69
70static void rna_WorkSpace_owner_ids_remove(WorkSpace *workspace,
72 PointerRNA *wstag_ptr)
73{
74 wmOwnerID *owner_id = static_cast<wmOwnerID *>(wstag_ptr->data);
75 if (BLI_remlink_safe(&workspace->owner_ids, owner_id) == false) {
78 "wmOwnerID '%s' not in workspace '%s'",
79 owner_id->name,
80 workspace->id.name + 2);
81 return;
82 }
83
84 MEM_freeN(owner_id);
85 wstag_ptr->invalidate();
86
88}
89
90static void rna_WorkSpace_owner_ids_clear(WorkSpace *workspace)
91{
92 BLI_freelistN(&workspace->owner_ids);
94}
95
96static int rna_WorkSpace_asset_library_get(PointerRNA *ptr)
97{
98 const WorkSpace *workspace = static_cast<WorkSpace *>(ptr->data);
100}
101
102static void rna_WorkSpace_asset_library_set(PointerRNA *ptr, int value)
103{
104 WorkSpace *workspace = static_cast<WorkSpace *>(ptr->data);
106}
107
108static bToolRef *rna_WorkSpace_tools_from_tkey(WorkSpace *workspace,
109 const bToolKey *tkey,
110 bool create)
111{
112 if (create) {
113 bToolRef *tref;
114 WM_toolsystem_ref_ensure(workspace, tkey, &tref);
115 return tref;
116 }
117 return WM_toolsystem_ref_find(workspace, tkey);
118}
119
120static bToolRef *rna_WorkSpace_tools_from_space_view3d_mode(WorkSpace *workspace,
121 int mode,
122 bool create)
123{
124 bToolKey key{};
126 key.mode = mode;
127 return rna_WorkSpace_tools_from_tkey(workspace, &key, create);
128}
129
130static bToolRef *rna_WorkSpace_tools_from_space_image_mode(WorkSpace *workspace,
131 int mode,
132 bool create)
133{
134 bToolKey key{};
136 key.mode = mode;
137 return rna_WorkSpace_tools_from_tkey(workspace, &key, create);
138}
139
140static bToolRef *rna_WorkSpace_tools_from_space_node(WorkSpace *workspace, bool create)
141{
142 bToolKey key{};
144 key.mode = 0;
145 return rna_WorkSpace_tools_from_tkey(workspace, &key, create);
146}
147static bToolRef *rna_WorkSpace_tools_from_space_sequencer(WorkSpace *workspace,
148 int mode,
149 bool create)
150{
151 bToolKey key{};
152 key.space_type = SPACE_SEQ;
153 key.mode = mode;
154 return rna_WorkSpace_tools_from_tkey(workspace, &key, create);
155}
156const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext * /*C*/,
158 PropertyRNA * /*prop*/,
159 bool * /*r_free*/)
160{
161 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
162 switch (tref->space_type) {
163 case SPACE_VIEW3D:
165 case SPACE_IMAGE:
167 case SPACE_SEQ:
169 }
171}
172
173static bool rna_WorkSpaceTool_use_paint_canvas_get(PointerRNA *ptr)
174{
175 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
176 return ED_image_paint_brush_type_use_canvas(nullptr, tref);
177}
178
179static int rna_WorkSpaceTool_index_get(PointerRNA *ptr)
180{
181 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
182 return (tref->runtime) ? tref->runtime->index : 0;
183}
184
185static bool rna_WorkSpaceTool_has_datablock_get(PointerRNA *ptr)
186{
187 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
188 return (tref->runtime) ? (tref->runtime->data_block[0] != '\0') : false;
189}
190
191static bool rna_WorkSpaceTool_use_brushes_get(PointerRNA *ptr)
192{
193 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
194 return (tref->runtime) ? ((tref->runtime->flag & TOOLREF_FLAG_USE_BRUSHES) != 0) : false;
195}
196
197static int rna_WorkSpaceTool_brush_type_get(PointerRNA *ptr)
198{
199 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
200 return tref->runtime ? tref->runtime->brush_type : -1;
201}
202
205 PropertyRNA * /*prop*/,
206 bool *r_free)
207{
208
209 PaintMode paint_mode = [&]() {
210 if (ptr->type == &RNA_WorkSpaceTool) {
211 const bToolRef *tref = static_cast<bToolRef *>(ptr->data);
212 return BKE_paintmode_get_from_tool(tref);
213 }
215 }();
216
217 EnumPropertyItem *items = nullptr;
218 int totitem = 0;
219
220 EnumPropertyItem unset_item = {
221 -1, "ANY", 0, "Any", "Donnot limit this tool to a specific brush type"};
222 RNA_enum_item_add(&items, &totitem, &unset_item);
223
224 if (paint_mode != PaintMode::Invalid) {
225 const EnumPropertyItem *valid_items = BKE_paint_get_tool_enum_from_paintmode(paint_mode);
226 RNA_enum_items_add(&items, &totitem, valid_items);
227 }
228
229 RNA_enum_item_end(&items, &totitem);
230
231 *r_free = true;
232 return items;
233}
234
235static void rna_WorkSpaceTool_widget_get(PointerRNA *ptr, char *value)
236{
237 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
238 strcpy(value, tref->runtime ? tref->runtime->gizmo_group : "");
239}
240
241static int rna_WorkSpaceTool_widget_length(PointerRNA *ptr)
242{
243 bToolRef *tref = static_cast<bToolRef *>(ptr->data);
244 return tref->runtime ? strlen(tref->runtime->gizmo_group) : 0;
245}
246
247#else /* RNA_RUNTIME */
248
250{
251 StructRNA *srna;
252 PropertyRNA *prop;
253
254 srna = RNA_def_struct(brna, "wmOwnerID", nullptr);
255 RNA_def_struct_sdna(srna, "wmOwnerID");
256 RNA_def_struct_ui_text(srna, "Work Space UI Tag", "");
257
258 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
259 RNA_def_property_ui_text(prop, "Name", "");
261}
262
264{
265 StructRNA *srna;
266
267 FunctionRNA *func;
268 PropertyRNA *parm;
269
270 RNA_def_property_srna(cprop, "wmOwnerIDs");
271 srna = RNA_def_struct(brna, "wmOwnerIDs", nullptr);
272 RNA_def_struct_sdna(srna, "WorkSpace");
273 RNA_def_struct_ui_text(srna, "WorkSpace UI Tags", "");
274
275 /* add owner_id */
276 func = RNA_def_function(srna, "new", "rna_WorkSpace_owner_ids_new");
277 RNA_def_function_ui_description(func, "Add ui tag");
278 parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the tag");
280 /* return type */
281 parm = RNA_def_pointer(func, "owner_id", "wmOwnerID", "", "");
282 RNA_def_function_return(func, parm);
283
284 /* remove owner_id */
285 func = RNA_def_function(srna, "remove", "rna_WorkSpace_owner_ids_remove");
287 RNA_def_function_ui_description(func, "Remove ui tag");
288 /* owner_id to remove */
289 parm = RNA_def_pointer(func, "owner_id", "wmOwnerID", "", "Tag to remove");
292
293 /* clear all modifiers */
294 func = RNA_def_function(srna, "clear", "rna_WorkSpace_owner_ids_clear");
295 RNA_def_function_ui_description(func, "Remove all tags");
296}
297
299{
300 StructRNA *srna;
301 PropertyRNA *prop;
302
303 srna = RNA_def_struct(brna, "WorkSpaceTool", nullptr);
304 RNA_def_struct_sdna(srna, "bToolRef");
305 RNA_def_struct_ui_text(srna, "Work Space Tool", "");
306
307 prop = RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE);
308 RNA_def_property_ui_text(prop, "Identifier", "");
310
311 prop = RNA_def_property(srna, "idname_fallback", PROP_STRING, PROP_NONE);
312 RNA_def_property_ui_text(prop, "Identifier Fallback", "");
313
314 prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
316 RNA_def_property_ui_text(prop, "Index", "");
317 RNA_def_property_int_funcs(prop, "rna_WorkSpaceTool_index_get", nullptr, nullptr);
318
319 prop = RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
320 RNA_def_property_enum_sdna(prop, nullptr, "space_type");
323 RNA_def_property_ui_text(prop, "Space Type", "");
324
325 prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
326 RNA_def_property_enum_sdna(prop, nullptr, "mode");
328 RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_WorkSpace_tools_mode_itemf");
329 RNA_def_property_ui_text(prop, "Tool Mode", "");
331
332 prop = RNA_def_property(srna, "use_paint_canvas", PROP_BOOLEAN, PROP_NONE);
334 RNA_def_property_ui_text(prop, "Index", "");
335 RNA_def_property_boolean_funcs(prop, "rna_WorkSpaceTool_use_paint_canvas_get", nullptr);
336 RNA_def_property_ui_text(prop, "Use Paint Canvas", "Does this tool use a painting canvas");
337
339
340 prop = RNA_def_property(srna, "has_datablock", PROP_BOOLEAN, PROP_NONE);
342 RNA_def_property_ui_text(prop, "Has Data-Block", "");
343 RNA_def_property_boolean_funcs(prop, "rna_WorkSpaceTool_has_datablock_get", nullptr);
344
345 prop = RNA_def_property(srna, "use_brushes", PROP_BOOLEAN, PROP_NONE);
347 RNA_def_property_ui_text(prop, "Uses Brushes", "");
348 RNA_def_property_boolean_funcs(prop, "rna_WorkSpaceTool_use_brushes_get", nullptr);
349
350 prop = RNA_def_property(srna, "brush_type", PROP_ENUM, PROP_NONE);
353 "Brush Type",
354 "If the tool uses brushes and is limited to a specific brush type, the "
355 "identifier of the brush type");
358 prop, "rna_WorkSpaceTool_brush_type_get", nullptr, "rna_WorkSpaceTool_brush_type_itemf");
359
361
362 prop = RNA_def_property(srna, "widget", PROP_STRING, PROP_NONE);
364 RNA_def_property_ui_text(prop, "Widget", "");
366 prop, "rna_WorkSpaceTool_widget_get", "rna_WorkSpaceTool_widget_length", nullptr);
367
369}
370
372{
373 StructRNA *srna;
374
375 FunctionRNA *func;
376 PropertyRNA *parm;
377
378 RNA_def_property_srna(cprop, "wmTools");
379 srna = RNA_def_struct(brna, "wmTools", nullptr);
380 RNA_def_struct_sdna(srna, "WorkSpace");
381 RNA_def_struct_ui_text(srna, "WorkSpace UI Tags", "");
382
383 /* add owner_id */
384 func = RNA_def_function(
385 srna, "from_space_view3d_mode", "rna_WorkSpace_tools_from_space_view3d_mode");
387 parm = RNA_def_enum(func, "mode", rna_enum_context_mode_items, 0, "", "");
389 RNA_def_boolean(func, "create", false, "Create", "");
390 /* return type */
391 parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
392 RNA_def_function_return(func, parm);
393
394 func = RNA_def_function(
395 srna, "from_space_image_mode", "rna_WorkSpace_tools_from_space_image_mode");
397 parm = RNA_def_enum(func, "mode", rna_enum_space_image_mode_all_items, 0, "", "");
399 RNA_def_boolean(func, "create", false, "Create", "");
400 /* return type */
401 parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
402 RNA_def_function_return(func, parm);
403
404 func = RNA_def_function(srna, "from_space_node", "rna_WorkSpace_tools_from_space_node");
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(
412 srna, "from_space_sequencer", "rna_WorkSpace_tools_from_space_sequencer");
414 parm = RNA_def_enum(func, "mode", rna_enum_space_sequencer_view_type_items, 0, "", "");
416 RNA_def_boolean(func, "create", false, "Create", "");
417 /* return type */
418 parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", "");
419 RNA_def_function_return(func, parm);
420}
421
423{
424 StructRNA *srna;
425 PropertyRNA *prop;
426
427 srna = RNA_def_struct(brna, "WorkSpace", "ID");
428 RNA_def_struct_sdna(srna, "WorkSpace");
430 srna, "Workspace", "Workspace data-block, defining the working environment for the user");
431 /* TODO: real icon, just to show something */
432 RNA_def_struct_ui_icon(srna, ICON_WORKSPACE);
433
434 prop = RNA_def_property(srna, "screens", PROP_COLLECTION, PROP_NONE);
435 RNA_def_property_collection_sdna(prop, nullptr, "layouts", nullptr);
436 RNA_def_property_struct_type(prop, "Screen");
438 "rna_workspace_screens_begin",
439 nullptr,
440 nullptr,
441 "rna_workspace_screens_item_get",
442 nullptr,
443 nullptr,
444 nullptr,
445 nullptr);
446 RNA_def_property_ui_text(prop, "Screens", "Screen layouts of a workspace");
447
448 prop = RNA_def_property(srna, "owner_ids", PROP_COLLECTION, PROP_NONE);
449 RNA_def_property_struct_type(prop, "wmOwnerID");
450 RNA_def_property_ui_text(prop, "UI Tags", "");
451 rna_def_workspace_owner_ids(brna, prop);
452
453 prop = RNA_def_property(srna, "tools", PROP_COLLECTION, PROP_NONE);
454 RNA_def_property_collection_sdna(prop, nullptr, "tools", nullptr);
455 RNA_def_property_struct_type(prop, "WorkSpaceTool");
456 RNA_def_property_ui_text(prop, "Tools", "");
457 rna_def_workspace_tools(brna, prop);
458
459 prop = RNA_def_property(srna, "object_mode", PROP_ENUM, PROP_NONE);
462 prop, "Object Mode", "Switch to this object mode when activating the workspace");
463
464 prop = RNA_def_property(srna, "use_pin_scene", PROP_BOOLEAN, PROP_NONE);
467 "Pin Scene",
468 "Remember the last used scene for the workspace and switch to it "
469 "whenever this workspace is activated again");
471
472 /* Flags */
473 prop = RNA_def_property(srna, "use_filter_by_owner", PROP_BOOLEAN, PROP_NONE);
476 RNA_def_property_ui_text(prop, "Use UI Tags", "Filter the UI by tags");
477 RNA_def_property_update(prop, 0, "rna_window_update_all");
478
480 srna, "rna_WorkSpace_asset_library_get", "rna_WorkSpace_asset_library_set");
482 "Asset Library",
483 "Active asset library to show in the UI, not used by the Asset Browser "
484 "(which has its own active asset library)");
486
487 RNA_api_workspace(srna);
488}
489
491{
494
495 rna_def_workspace(brna);
496}
497
498#endif /* RNA_RUNTIME */
PaintMode
Definition BKE_paint.hh:93
const EnumPropertyItem * BKE_paint_get_tool_enum_from_paintmode(PaintMode mode)
Definition paint.cc:400
PaintMode BKE_paintmode_get_active_from_context(const bContext *C)
Definition paint.cc:496
PaintMode BKE_paintmode_get_from_tool(const bToolRef *tref)
Definition paint.cc:552
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
bScreen * BKE_workspace_layout_screen_get(const WorkSpaceLayout *layout) GETTER_ATTRS
Definition workspace.cc:637
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:688
@ SPACE_NODE
@ SPACE_SEQ
@ SPACE_IMAGE
@ SPACE_VIEW3D
@ TOOLREF_FLAG_USE_BRUSHES
@ WORKSPACE_USE_FILTER_BY_ORIGIN
@ WORKSPACE_USE_PIN_SCENE
bool ED_image_paint_brush_type_use_canvas(bContext *C, bToolRef *tref)
ParameterFlag
Definition RNA_types.hh:510
@ PARM_RNAPTR
Definition RNA_types.hh:513
@ PARM_REQUIRED
Definition RNA_types.hh:511
@ FUNC_USE_REPORTS
Definition RNA_types.hh:805
@ PROP_BOOLEAN
Definition RNA_types.hh:150
@ PROP_ENUM
Definition RNA_types.hh:154
@ PROP_INT
Definition RNA_types.hh:151
@ PROP_STRING
Definition RNA_types.hh:153
@ PROP_COLLECTION
Definition RNA_types.hh:156
PropertyFlag
Definition RNA_types.hh:286
@ PROP_THICK_WRAP
Definition RNA_types.hh:397
@ PROP_ANIMATABLE
Definition RNA_types.hh:305
@ PROP_EDITABLE
Definition RNA_types.hh:292
@ PROP_NEVER_NULL
Definition RNA_types.hh:351
@ PROP_NONE
Definition RNA_types.hh:221
#define C
Definition RandGen.cpp:29
#define ND_ASSET_LIST_READING
Definition WM_types.hh:547
#define NC_WINDOW
Definition WM_types.hh:372
#define ND_MODIFIER
Definition WM_types.hh:459
ReportList * reports
Definition WM_types.hh:1025
#define NC_WORKSPACE
Definition WM_types.hh:373
#define NC_ASSET
Definition WM_types.hh:401
#define NA_REMOVED
Definition WM_types.hh:584
#define NC_OBJECT
Definition WM_types.hh:376
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 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:723
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_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_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:72
const EnumPropertyItem rna_enum_space_sequencer_view_type_items[]
Definition rna_space.cc:177
const EnumPropertyItem rna_enum_space_image_mode_all_items[]
Definition rna_space.cc:285
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:404
char name[66]
Definition DNA_ID.h:415
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:4227
bToolRef * WM_toolsystem_ref_find(WorkSpace *workspace, const bToolKey *tkey)
bool WM_toolsystem_ref_ensure(WorkSpace *workspace, const bToolKey *tkey, bToolRef **r_tref)