Blender V5.0
rna_collection.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 <cstdlib>
10
11#include "BKE_file_handler.hh"
12
14
15#include "BLI_path_utils.hh"
16#include "BLI_utildefines.h"
17
18#include "RNA_define.hh"
19#include "RNA_enum_types.hh"
20
21#include "rna_internal.hh"
22
23#include "WM_types.hh"
24
26 {COLLECTION_COLOR_NONE, "NONE", ICON_X, "None", "Assign no color tag to the collection"},
27 {COLLECTION_COLOR_01, "COLOR_01", ICON_COLLECTION_COLOR_01, "Color 01", ""},
28 {COLLECTION_COLOR_02, "COLOR_02", ICON_COLLECTION_COLOR_02, "Color 02", ""},
29 {COLLECTION_COLOR_03, "COLOR_03", ICON_COLLECTION_COLOR_03, "Color 03", ""},
30 {COLLECTION_COLOR_04, "COLOR_04", ICON_COLLECTION_COLOR_04, "Color 04", ""},
31 {COLLECTION_COLOR_05, "COLOR_05", ICON_COLLECTION_COLOR_05, "Color 05", ""},
32 {COLLECTION_COLOR_06, "COLOR_06", ICON_COLLECTION_COLOR_06, "Color 06", ""},
33 {COLLECTION_COLOR_07, "COLOR_07", ICON_COLLECTION_COLOR_07, "Color 07", ""},
34 {COLLECTION_COLOR_08, "COLOR_08", ICON_COLLECTION_COLOR_08, "Color 08", ""},
35 {0, nullptr, 0, nullptr, nullptr},
36};
37/* Minus 1 for NONE & 1 for the nullptr sentinel. */
39 "Collection color total is an invalid size");
40
41#ifdef RNA_RUNTIME
42
43# include <fmt/format.h>
44
45# include "DNA_object_types.h"
46# include "DNA_scene_types.h"
47
48# include "DEG_depsgraph.hh"
49# include "DEG_depsgraph_build.hh"
50# include "DEG_depsgraph_query.hh"
51
52# include "BKE_collection.hh"
53# include "BKE_global.hh"
54# include "BKE_idprop.hh"
55# include "BKE_layer.hh"
56# include "BKE_lib_id.hh"
57# include "BKE_library.hh"
58# include "BKE_report.hh"
59
60# include "BLT_translation.hh"
61
62# include "WM_api.hh"
63
64# include "RNA_access.hh"
65
66static void rna_Collection_all_objects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
67{
68 Collection *collection = (Collection *)ptr->data;
69 ListBase collection_objects = BKE_collection_object_cache_get(collection);
70 rna_iterator_listbase_begin(iter, ptr, &collection_objects, nullptr);
71}
72
73static PointerRNA rna_Collection_all_objects_get(CollectionPropertyIterator *iter)
74{
75 ListBaseIterator *internal = &iter->internal.listbase;
76
77 /* we are actually iterating a ObjectBase list, so override get */
78 Base *base = (Base *)internal->link;
79 return RNA_id_pointer_create(&base->object->id);
80}
81
82static void rna_Collection_objects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
83{
84 Collection *collection = (Collection *)ptr->data;
85 rna_iterator_listbase_begin(iter, ptr, &collection->gobject, nullptr);
86}
87
88static PointerRNA rna_Collection_objects_get(CollectionPropertyIterator *iter)
89{
90 ListBaseIterator *internal = &iter->internal.listbase;
91
92 /* we are actually iterating a ObjectBase list, so override get */
93 CollectionObject *cob = (CollectionObject *)internal->link;
94 return RNA_id_pointer_create(&cob->ob->id);
95}
96
97static bool rna_collection_objects_edit_check(Collection *collection,
98 ReportList *reports,
99 Object *object)
100{
101 if (!DEG_is_original(collection)) {
103 reports, RPT_ERROR, "Collection '%s' is not an original ID", collection->id.name + 2);
104 return false;
105 }
106 if (!DEG_is_original(object)) {
107 BKE_reportf(reports, RPT_ERROR, "Collection '%s' is not an original ID", object->id.name + 2);
108 return false;
109 }
110 /* Currently this should not be allowed (might be supported in the future though...). */
111 if (ID_IS_OVERRIDE_LIBRARY(&collection->id)) {
112 BKE_reportf(reports,
113 RPT_ERROR,
114 "Could not (un)link the object '%s' because the collection '%s' is overridden",
115 object->id.name + 2,
116 collection->id.name + 2);
117 return false;
118 }
119 if (!ID_IS_EDITABLE(&collection->id)) {
120 BKE_reportf(reports,
121 RPT_ERROR,
122 "Could not (un)link the object '%s' because the collection '%s' is linked",
123 object->id.name + 2,
124 collection->id.name + 2);
125 return false;
126 }
127 return true;
128}
129
130static void rna_Collection_objects_link(Collection *collection,
131 Main *bmain,
132 ReportList *reports,
133 Object *object)
134{
135 if (!rna_collection_objects_edit_check(collection, reports, object)) {
136 return;
137 }
138 if (!BKE_collection_object_add(bmain, collection, object)) {
139 BKE_reportf(reports,
140 RPT_ERROR,
141 "Object '%s' already in collection '%s'",
142 object->id.name + 2,
143 collection->id.name + 2);
144 return;
145 }
146
150}
151
152static void rna_Collection_objects_unlink(Collection *collection,
153 Main *bmain,
154 ReportList *reports,
155 Object *object)
156{
157 if (!rna_collection_objects_edit_check(collection, reports, object)) {
158 return;
159 }
160 if (!BKE_collection_object_remove(bmain, collection, object, false)) {
161 BKE_reportf(reports,
162 RPT_ERROR,
163 "Object '%s' not in collection '%s'",
164 object->id.name + 2,
165 collection->id.name + 2);
166 return;
167 }
168
172}
173
174static bool rna_Collection_objects_override_apply(Main *bmain,
176{
177 PointerRNA *ptr_dst = &rnaapply_ctx.ptr_dst;
178 PropertyRNA *prop_dst = rnaapply_ctx.prop_dst;
179 PointerRNA *ptr_item_dst = &rnaapply_ctx.ptr_item_dst;
180 PointerRNA *ptr_item_src = &rnaapply_ctx.ptr_item_src;
182
184 "Unsupported RNA override operation on collections' objects");
185 UNUSED_VARS_NDEBUG(opop);
186
187 Collection *coll_dst = (Collection *)ptr_dst->owner_id;
188
189 if (ptr_item_dst->type == nullptr || ptr_item_src->type == nullptr) {
190 // BLI_assert_msg(0, "invalid source or destination object.");
191 return false;
192 }
193
194 Object *ob_dst = static_cast<Object *>(ptr_item_dst->data);
195 Object *ob_src = static_cast<Object *>(ptr_item_src->data);
196
197 if (ob_src == ob_dst) {
198 return true;
199 }
200
201 if (!BKE_collection_object_replace(bmain, coll_dst, ob_dst, ob_src)) {
202 BLI_assert_msg(0, "Could not find destination object in destination collection!");
203 return false;
204 }
205
206 RNA_property_update_main(bmain, nullptr, ptr_dst, prop_dst);
207 return true;
208}
209
210static void rna_Collection_children_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
211{
212 Collection *collection = (Collection *)ptr->data;
213 rna_iterator_listbase_begin(iter, ptr, &collection->children, nullptr);
214}
215
216static PointerRNA rna_Collection_children_get(CollectionPropertyIterator *iter)
217{
218 ListBaseIterator *internal = &iter->internal.listbase;
219
220 /* we are actually iterating a CollectionChild list, so override get */
221 CollectionChild *child = (CollectionChild *)internal->link;
222 return RNA_id_pointer_create(&child->collection->id);
223}
224
225static bool rna_collection_children_edit_check(Collection *collection,
226 ReportList *reports,
227 Collection *child)
228{
229 if (!DEG_is_original(collection)) {
231 reports, RPT_ERROR, "Collection '%s' is not an original ID", collection->id.name + 2);
232 return false;
233 }
234 if (!DEG_is_original(child)) {
235 BKE_reportf(reports, RPT_ERROR, "Collection '%s' is not an original ID", child->id.name + 2);
236 return false;
237 }
238 /* Currently this should not be allowed (might be supported in the future though...). */
239 if (ID_IS_OVERRIDE_LIBRARY(&collection->id)) {
240 BKE_reportf(reports,
241 RPT_ERROR,
242 "Could not (un)link the collection '%s' because the collection '%s' is overridden",
243 child->id.name + 2,
244 collection->id.name + 2);
245 return false;
246 }
247 if (!ID_IS_EDITABLE(&collection->id)) {
248 BKE_reportf(reports,
249 RPT_ERROR,
250 "Could not (un)link the collection '%s' because the collection '%s' is linked",
251 child->id.name + 2,
252 collection->id.name + 2);
253 return false;
254 }
255 return true;
256}
257
258static void rna_Collection_children_link(Collection *collection,
259 Main *bmain,
260 ReportList *reports,
261 Collection *child)
262{
263 if (!rna_collection_children_edit_check(collection, reports, child)) {
264 return;
265 }
266 if (!BKE_collection_child_add(bmain, collection, child)) {
267 BKE_reportf(reports,
268 RPT_ERROR,
269 "Collection '%s' already in collection '%s'",
270 child->id.name + 2,
271 collection->id.name + 2);
272 return;
273 }
274
278}
279
280static void rna_Collection_children_unlink(Collection *collection,
281 Main *bmain,
282 ReportList *reports,
283 Collection *child)
284{
285 if (!rna_collection_children_edit_check(collection, reports, child)) {
286 return;
287 }
288 if (!BKE_collection_child_remove(bmain, collection, child)) {
289 BKE_reportf(reports,
290 RPT_ERROR,
291 "Collection '%s' not in collection '%s'",
292 child->id.name + 2,
293 collection->id.name + 2);
294 return;
295 }
296
300}
301
302static bool rna_Collection_children_override_apply(Main *bmain,
304{
305 PointerRNA *ptr_dst = &rnaapply_ctx.ptr_dst;
306 PropertyRNA *prop_dst = rnaapply_ctx.prop_dst;
307 PointerRNA *ptr_item_dst = &rnaapply_ctx.ptr_item_dst;
308 PointerRNA *ptr_item_src = &rnaapply_ctx.ptr_item_src;
310
312 "Unsupported RNA override operation on collections' children");
313 UNUSED_VARS_NDEBUG(opop);
314
315 Collection *coll_dst = (Collection *)ptr_dst->owner_id;
316
317 if (ptr_item_dst->type == nullptr || ptr_item_src->type == nullptr) {
318 /* This can happen when reference and overrides differ, just ignore then. */
319 return false;
320 }
321
322 Collection *subcoll_dst = static_cast<Collection *>(ptr_item_dst->data);
323 Collection *subcoll_src = static_cast<Collection *>(ptr_item_src->data);
324
325 CollectionChild *collchild_dst = static_cast<CollectionChild *>(
326 BLI_findptr(&coll_dst->children, subcoll_dst, offsetof(CollectionChild, collection)));
327
328 if (collchild_dst == nullptr) {
329 BLI_assert_msg(0, "Could not find destination sub-collection in destination collection!");
330 return false;
331 }
332
333 /* XXX TODO: We most certainly rather want to have a 'swap object pointer in collection'
334 * util in BKE_collection. This is only temp quick dirty test! */
335 id_us_min(&collchild_dst->collection->id);
336 collchild_dst->collection = subcoll_src;
337 id_us_plus(&collchild_dst->collection->id);
338
339 BKE_collection_object_cache_free(bmain, coll_dst, 0);
341
342 RNA_property_update_main(bmain, nullptr, ptr_dst, prop_dst);
343 return true;
344}
345
346static void rna_Collection_flag_set(PointerRNA *ptr, const bool value, const int flag)
347{
348 Collection *collection = (Collection *)ptr->data;
349
350 if (collection->flag & COLLECTION_IS_MASTER) {
351 return;
352 }
353
354 if (value) {
355 collection->flag |= flag;
356 }
357 else {
358 collection->flag &= ~flag;
359 }
360}
361
362static void rna_Collection_hide_select_set(PointerRNA *ptr, bool value)
363{
364 rna_Collection_flag_set(ptr, value, COLLECTION_HIDE_SELECT);
365}
366
367static void rna_Collection_hide_viewport_set(PointerRNA *ptr, bool value)
368{
369 rna_Collection_flag_set(ptr, value, COLLECTION_HIDE_VIEWPORT);
370}
371
372static void rna_Collection_hide_render_set(PointerRNA *ptr, bool value)
373{
374 rna_Collection_flag_set(ptr, value, COLLECTION_HIDE_RENDER);
375}
376
377static void rna_Collection_flag_update(Main *bmain, Scene *scene, PointerRNA *ptr)
378{
379 Collection *collection = (Collection *)ptr->data;
380 BKE_collection_object_cache_free(bmain, collection, 0);
382
386}
387
388static int rna_Collection_color_tag_get(PointerRNA *ptr)
389{
390 Collection *collection = (Collection *)ptr->data;
391
392 return collection->color_tag;
393}
394
395static void rna_Collection_color_tag_set(PointerRNA *ptr, int value)
396{
397 Collection *collection = (Collection *)ptr->data;
398
399 if (collection->flag & COLLECTION_IS_MASTER) {
400 return;
401 }
402
403 collection->color_tag = value;
404}
405
406static void rna_Collection_color_tag_update(Main * /*bmain*/, Scene *scene, PointerRNA * /*ptr*/)
407{
409}
410
411static void rna_Collection_instance_offset_update(Main * /*bmain*/,
412 Scene * /*scene*/,
414{
415 Collection *collection = (Collection *)ptr->data;
417}
418
419static std::optional<std::string> rna_CollectionLightLinking_path(const PointerRNA *ptr)
420{
421 Collection *collection = (Collection *)ptr->owner_id;
422 CollectionLightLinking *collection_light_linking = (CollectionLightLinking *)ptr->data;
423
424 int counter;
425
426 counter = 0;
427 LISTBASE_FOREACH (CollectionObject *, collection_object, &collection->gobject) {
428 if (&collection_object->light_linking == collection_light_linking) {
429 return fmt::format("collection_objects[{}].light_linking", counter);
430 }
431 ++counter;
432 }
433
434 counter = 0;
435 LISTBASE_FOREACH (CollectionChild *, collection_child, &collection->children) {
436 if (&collection_child->light_linking == collection_light_linking) {
437 return fmt::format("collection_children[{}].light_linking", counter);
438 }
439 ++counter;
440 }
441
442 return "..";
443}
444
445static void rna_CollectionLightLinking_update(Main *bmain, Scene * /*scene*/, PointerRNA *ptr)
446{
447 /* The light linking collection comes from the collection. It does not have shading component,
448 * but is collected to objects via hierarchy component. Tagging its hierarchy for update will
449 * lead the objects which use the collection to update its shading. */
451
452 /* Tag relations for update so that an updated state of light sets is calculated. */
454}
455
456static void rna_CollectionExport_name_set(PointerRNA *ptr, const char *value)
457{
458 CollectionExport *data = reinterpret_cast<CollectionExport *>(ptr->data);
459 BKE_collection_exporter_name_set(nullptr, data, value);
460}
461
462static CollectionExport *rna_CollectionExport_new(Collection *collection,
463 ReportList *reports,
464 int type,
465 const char *name)
466{
467 blender::bke::FileHandlerType *fh = nullptr;
470 if (types.index_range().contains(type)) {
471 fh = types[type].get();
472 }
473 if (fh) {
475 collection, fh->idname, name ? (char *)name : fh->label);
476
478 return exporter;
479 }
480 else {
481 BKE_reportf(reports, RPT_ERROR, "File handler not found");
482 return nullptr;
483 }
484}
485
486static void rna_CollectionExport_remove(Collection *collection, CollectionExport *exporter)
487{
488 BKE_collection_exporter_remove(collection, exporter);
490}
491
492static void rna_CollectionExport_move(Collection *collection,
493 ReportList *reports,
494 const int from,
495 const int to)
496{
497 if (!BKE_collection_exporter_move(collection, from, to)) {
498 BKE_reportf(reports,
499 RPT_ERROR,
500 "Could not move collection exporter from index '%d' to '%d'",
501 from,
502 to);
503 return;
504 }
505
507}
508
509static const EnumPropertyItem *rna_CollectionExport_type_itemf(bContext * /*C*/,
510 PointerRNA * /*ptr*/,
511 PropertyRNA * /*prop*/,
512 bool *r_free)
513{
514 EnumPropertyItem *item = nullptr, item_tmp = {0};
515 int totitem = 0;
518
519 for (const int i : types.index_range()) {
521 if (WM_operatortype_find(fh->export_operator, true)) {
522 item_tmp.value = i;
523 item_tmp.identifier = fh->idname;
524 item_tmp.name = fh->label;
525
526 RNA_enum_item_add(&item, &totitem, &item_tmp);
527 }
528 }
529
530 if (totitem == 0) {
531 *r_free = false;
533 }
534
535 RNA_enum_item_end(&item, &totitem);
536 *r_free = true;
537
538 return item;
539}
540
541static PointerRNA rna_CollectionExport_export_properties_get(PointerRNA *ptr)
542{
543 const CollectionExport *data = reinterpret_cast<CollectionExport *>(ptr->data);
544
545 /* If the File Handler or Operator is missing, we allow the data to be accessible
546 * as generic ID properties. */
548 if (!fh) {
550 ptr->owner_id, &RNA_IDPropertyWrapPtr, data->export_properties);
551 }
552
554 if (!ot) {
556 ptr->owner_id, &RNA_IDPropertyWrapPtr, data->export_properties);
557 }
558
559 return RNA_pointer_create_discrete(ptr->owner_id, ot->srna, data->export_properties);
560}
561
562static const char *rna_CollectionExport_filepath_value_from_idprop(CollectionExport *data)
563{
564 if (IDProperty *group = data->export_properties) {
565 IDProperty *filepath_prop = IDP_GetPropertyFromGroup(group, "filepath");
566 if (filepath_prop && filepath_prop->type == IDP_STRING) {
567 return IDP_string_get(filepath_prop);
568 }
569 }
570 return nullptr;
571}
572
573static void rna_CollectionExport_filepath_get(PointerRNA *ptr, char *value)
574{
575 CollectionExport *data = reinterpret_cast<CollectionExport *>(ptr->data);
576 const char *value_src = rna_CollectionExport_filepath_value_from_idprop(data);
577 strcpy(value, value_src ? value_src : "");
578}
579static int rna_CollectionExport_filepath_length(PointerRNA *ptr)
580{
581 CollectionExport *data = reinterpret_cast<CollectionExport *>(ptr->data);
582 const char *value_src = rna_CollectionExport_filepath_value_from_idprop(data);
583 return value_src ? strlen(value_src) : 0;
584}
585static void rna_CollectionExport_filepath_set(PointerRNA *ptr, const char *value)
586{
587 CollectionExport *data = reinterpret_cast<CollectionExport *>(ptr->data);
588 if (!data->export_properties) {
589 IDPropertyTemplate val{};
590 data->export_properties = IDP_New(IDP_GROUP, &val, "export_properties");
591 }
592 IDProperty *group = data->export_properties;
593 /* By convention all exporters are expected to have a `filepath` property.
594 * See #WM_operator_properties_filesel. */
595 const char *prop_id = "filepath";
596 const size_t value_maxsize = FILE_MAX;
597 IDProperty *prop = IDP_GetPropertyFromGroup(group, prop_id);
598 if (prop && prop->type != IDP_STRING) {
599 IDP_FreeFromGroup(group, prop);
600 prop = nullptr;
601 }
602 if (prop == nullptr) {
603 prop = IDP_NewStringMaxSize(value, value_maxsize, prop_id);
604 IDP_AddToGroup(group, prop);
605 }
606 else {
607 IDP_AssignStringMaxSize(prop, value, value_maxsize);
608 }
609}
610
611#else
612
613/* collection.objects */
615{
616 StructRNA *srna;
617 FunctionRNA *func;
618 PropertyRNA *parm;
619
620 RNA_def_property_srna(cprop, "CollectionObjects");
621 srna = RNA_def_struct(brna, "CollectionObjects", nullptr);
622 RNA_def_struct_sdna(srna, "Collection");
623 RNA_def_struct_ui_text(srna, "Collection Objects", "Collection of collection objects");
624
625 /* add object */
626 func = RNA_def_function(srna, "link", "rna_Collection_objects_link");
628 RNA_def_function_ui_description(func, "Add this object to a collection");
629 parm = RNA_def_pointer(func, "object", "Object", "", "Object to add");
631
632 /* remove object */
633 func = RNA_def_function(srna, "unlink", "rna_Collection_objects_unlink");
634 RNA_def_function_ui_description(func, "Remove this object from a collection");
636 parm = RNA_def_pointer(func, "object", "Object", "", "Object to remove");
638}
639
640/* collection.children */
642{
643 StructRNA *srna;
644 FunctionRNA *func;
645 PropertyRNA *parm;
646
647 RNA_def_property_srna(cprop, "CollectionChildren");
648 srna = RNA_def_struct(brna, "CollectionChildren", nullptr);
649 RNA_def_struct_sdna(srna, "Collection");
650 RNA_def_struct_ui_text(srna, "Collection Children", "Collection of child collections");
651
652 /* add child */
653 func = RNA_def_function(srna, "link", "rna_Collection_children_link");
655 RNA_def_function_ui_description(func, "Add this collection as child of this collection");
656 parm = RNA_def_pointer(func, "child", "Collection", "", "Collection to add");
658
659 /* remove child */
660 func = RNA_def_function(srna, "unlink", "rna_Collection_children_unlink");
661 RNA_def_function_ui_description(func, "Remove this child collection from a collection");
663 parm = RNA_def_pointer(func, "child", "Collection", "", "Collection to remove");
665}
666
668{
669 StructRNA *srna;
670 FunctionRNA *func;
671 PropertyRNA *parm;
672
673 RNA_def_property_srna(cprop, "CollectionExports");
674 srna = RNA_def_struct(brna, "CollectionExports", nullptr);
675 RNA_def_struct_sdna(srna, "Collection");
676 RNA_def_struct_ui_text(srna, "Export Handlers", "Collection of export handlers");
677
678 func = RNA_def_function(srna, "new", "rna_CollectionExport_new");
679 RNA_def_function_ui_description(func, "Add an export handler to the collection");
681 parm = RNA_def_enum(
682 func, "type", rna_enum_dummy_DEFAULT_items, 0, "Type", "The type of export handler to add");
683 RNA_def_property_enum_funcs(parm, nullptr, nullptr, "rna_CollectionExport_type_itemf");
685 RNA_def_string(func, "name", nullptr, 0, "Name", "Name of the new export handler");
686 parm = RNA_def_pointer(func, "exporter", "CollectionExport", "", "Newly created export handler");
687 RNA_def_function_return(func, parm);
688
689 func = RNA_def_function(srna, "remove", "rna_CollectionExport_remove");
690 RNA_def_function_ui_description(func, "Remove an export handler from the collection");
691 parm = RNA_def_pointer(func, "exporter", "CollectionExport", "", "Export Handler to remove");
693
694 func = RNA_def_function(srna, "move", "rna_CollectionExport_move");
695 RNA_def_function_ui_description(func, "Move an export handler");
697 parm = RNA_def_int(
698 func, "from_index", -1, INT_MIN, INT_MAX, "From Index", "Index to move", 0, 10000);
700 parm = RNA_def_int(func, "to_index", -1, INT_MIN, INT_MAX, "To Index", "Target index", 0, 10000);
702}
703
705{
706 StructRNA *srna;
707 PropertyRNA *prop;
708
709 /* TODO(sergey): Use proper icons. */
710 static const EnumPropertyItem light_linking_state_items[] = {
711 {COLLECTION_LIGHT_LINKING_STATE_INCLUDE, "INCLUDE", ICON_OUTLINER_OB_LIGHT, "Include", ""},
712 {COLLECTION_LIGHT_LINKING_STATE_EXCLUDE, "EXCLUDE", ICON_LIGHT, "Exclude", ""},
713 {0, nullptr, 0, nullptr, nullptr},
714 };
715
717
718 srna = RNA_def_struct(brna, "CollectionLightLinking", nullptr);
719 RNA_def_struct_sdna(srna, "CollectionLightLinking");
721 srna,
722 "Collection Light Linking",
723 "Light linking settings of objects and children collections of a collection");
724 RNA_def_struct_path_func(srna, "rna_CollectionLightLinking_path");
725
726 /* Light state. */
727 prop = RNA_def_property(srna, "link_state", PROP_ENUM, PROP_NONE);
728 RNA_def_property_enum_items(prop, light_linking_state_items);
730 prop, "Link State", "Light or shadow receiving state of the object or collection");
732 RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_CollectionLightLinking_update");
733
735}
736
738{
739 StructRNA *srna;
740 PropertyRNA *prop;
741
742 srna = RNA_def_struct(brna, "CollectionObject", nullptr);
743 RNA_def_struct_sdna(srna, "CollectionObject");
745 srna, "Collection Object", "Object of a collection with its collection related settings");
746
748
749 /* Light Linking. */
750 prop = RNA_def_property(srna, "light_linking", PROP_POINTER, PROP_NONE);
752 RNA_def_property_struct_type(prop, "CollectionLightLinking");
753 RNA_def_property_ui_text(prop, "Light Linking", "Light linking settings of the collection");
754
756}
757
759{
760 StructRNA *srna;
761 PropertyRNA *prop;
762
763 srna = RNA_def_struct(brna, "CollectionChild", nullptr);
764 RNA_def_struct_sdna(srna, "CollectionChild");
766 srna, "Collection Child", "Child collection with its collection related settings");
767
769
770 /* Light Linking. */
771 prop = RNA_def_property(srna, "light_linking", PROP_POINTER, PROP_NONE);
773 RNA_def_property_struct_type(prop, "CollectionLightLinking");
775 prop, "Light Linking", "Light linking settings of the collection object");
776
778}
779
781{
782 StructRNA *srna;
783 PropertyRNA *prop;
784
785 srna = RNA_def_struct(brna, "CollectionExport", nullptr);
786 RNA_def_struct_sdna(srna, "CollectionExport");
787 RNA_def_struct_ui_text(srna, "Collection Export Data", "Exporter configured for the collection");
788
789 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
790 RNA_def_struct_ui_text(srna, "Name", "");
792 RNA_def_property_string_funcs(prop, nullptr, nullptr, "rna_CollectionExport_name_set");
793
794 prop = RNA_def_property(srna, "is_open", PROP_BOOLEAN, PROP_NONE);
796 RNA_def_property_ui_text(prop, "Is Open", "Whether the panel is expanded or closed");
799
800 prop = RNA_def_property(srna, "export_properties", PROP_POINTER, PROP_NONE);
801 RNA_def_property_struct_type(prop, "PropertyGroup");
803 prop, "Export Properties", "Properties associated with the configured exporter");
805 prop, "rna_CollectionExport_export_properties_get", nullptr, nullptr, nullptr);
806
807 /* Wrap the operator property because exposing the operator property directly
808 * causes problems, as the operator property typically wont support
809 * #PROP_PATH_SUPPORTS_BLEND_RELATIVE, when the collection property does since
810 * it's expanded before passing it to the operator, see #137856 & #137507. */
811 prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
814 "rna_CollectionExport_filepath_get",
815 "rna_CollectionExport_filepath_length",
816 "rna_CollectionExport_filepath_set");
818 RNA_def_property_ui_text(prop, "File Path", "The file path used for exporting");
821}
822
824{
825 StructRNA *srna;
826 PropertyRNA *prop;
827
828 srna = RNA_def_struct(brna, "Collection", "ID");
829 RNA_def_struct_ui_text(srna, "Collection", "Collection of Object data-blocks");
830 RNA_def_struct_ui_icon(srna, ICON_GROUP);
831 /* This is done on save/load in `readfile.cc`,
832 * removed if no objects are in the collection and not in a scene. */
834
836
837 prop = RNA_def_property(srna, "instance_offset", PROP_FLOAT, PROP_TRANSLATION);
839 prop, "Instance Offset", "Offset from the origin to use when instancing");
840 RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, RNA_TRANSLATION_PREC_DEFAULT);
841 RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Collection_instance_offset_update");
842
843 prop = RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
844 RNA_def_property_struct_type(prop, "Object");
845 RNA_def_property_override_funcs(prop, nullptr, nullptr, "rna_Collection_objects_override_apply");
846 RNA_def_property_ui_text(prop, "Objects", "Objects that are directly in this collection");
848 "rna_Collection_objects_begin",
849 "rna_iterator_listbase_next",
850 "rna_iterator_listbase_end",
851 "rna_Collection_objects_get",
852 nullptr,
853 nullptr,
854 nullptr,
855 nullptr);
856 rna_def_collection_objects(brna, prop);
857
858 prop = RNA_def_property(srna, "all_objects", PROP_COLLECTION, PROP_NONE);
859 RNA_def_property_struct_type(prop, "Object");
861 prop, "All Objects", "Objects that are in this collection and its child collections");
865 "rna_Collection_all_objects_begin",
866 "rna_iterator_listbase_next",
867 "rna_iterator_listbase_end",
868 "rna_Collection_all_objects_get",
869 nullptr,
870 nullptr,
871 nullptr,
872 nullptr);
873
874 prop = RNA_def_property(srna, "children", PROP_COLLECTION, PROP_NONE);
875 RNA_def_property_struct_type(prop, "Collection");
877 prop, nullptr, nullptr, "rna_Collection_children_override_apply");
879 prop, "Children", "Collections that are immediate children of this collection");
881 "rna_Collection_children_begin",
882 "rna_iterator_listbase_next",
883 "rna_iterator_listbase_end",
884 "rna_Collection_children_get",
885 nullptr,
886 nullptr,
887 nullptr,
888 nullptr);
889 rna_def_collection_children(brna, prop);
890
891 /* Collection objects. */
892 prop = RNA_def_property(srna, "collection_objects", PROP_COLLECTION, PROP_NONE);
893 RNA_def_property_struct_type(prop, "CollectionObject");
894 RNA_def_property_collection_sdna(prop, nullptr, "gobject", nullptr);
896 prop,
897 "Collection Objects",
898 "Objects of the collection with their parent-collection-specific settings");
899 /* TODO(sergey): Functions to link and unlink objects. */
900
901 /* Children collections. */
902 prop = RNA_def_property(srna, "collection_children", PROP_COLLECTION, PROP_NONE);
903 RNA_def_property_struct_type(prop, "CollectionChild");
904 RNA_def_property_collection_sdna(prop, nullptr, "children", nullptr);
906 "Collection Children",
907 "Children collections with their parent-collection-specific settings");
908
909 /* Export Handlers. */
910 prop = RNA_def_property(srna, "exporters", PROP_COLLECTION, PROP_NONE);
911 RNA_def_property_struct_type(prop, "CollectionExport");
912 RNA_def_property_collection_sdna(prop, nullptr, "exporters", nullptr);
914 prop, "Collection Export Handlers", "Export Handlers configured for the collection");
916
917 prop = RNA_def_property(srna, "active_exporter_index", PROP_INT, PROP_UNSIGNED);
920 prop, "Active Collection Exporter Index", "Active index in the exporters list");
921
922 /* TODO(sergey): Functions to link and unlink collections. */
923
924 /* Flags */
925 prop = RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE);
927 RNA_def_property_boolean_funcs(prop, nullptr, "rna_Collection_hide_select_set");
929 RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, -1);
930 RNA_def_property_ui_text(prop, "Disable Selection", "Disable selection in viewport");
931 RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_Collection_flag_update");
932
933 prop = RNA_def_property(srna, "hide_viewport", PROP_BOOLEAN, PROP_NONE);
935 RNA_def_property_boolean_funcs(prop, nullptr, "rna_Collection_hide_viewport_set");
937 RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, -1);
938 RNA_def_property_ui_text(prop, "Disable in Viewports", "Globally disable in viewports");
939 RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_Collection_flag_update");
940
941 prop = RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE);
943 RNA_def_property_boolean_funcs(prop, nullptr, "rna_Collection_hide_render_set");
945 RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1);
946 RNA_def_property_ui_text(prop, "Disable in Renders", "Globally disable in renders");
947 RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_Collection_flag_update");
948
949 static const EnumPropertyItem rna_collection_lineart_usage[] = {
951 "INCLUDE",
952 0,
953 "Include",
954 "Generate feature lines for this collection"},
956 "OCCLUSION_ONLY",
957 0,
958 "Occlusion Only",
959 "Only use the collection to produce occlusion"},
960 {COLLECTION_LRT_EXCLUDE, "EXCLUDE", 0, "Exclude", "Don't use this collection in Line Art"},
962 "INTERSECTION_ONLY",
963 0,
964 "Intersection Only",
965 "Only generate intersection lines for this collection"},
967 "NO_INTERSECTION",
968 0,
969 "No Intersection",
970 "Include this collection but do not generate intersection lines"},
972 "FORCE_INTERSECTION",
973 0,
974 "Force Intersection",
975 "Generate intersection lines even with objects that disabled intersection"},
976 {0, nullptr, 0, nullptr, nullptr}};
977
978 prop = RNA_def_property(srna, "lineart_usage", PROP_ENUM, PROP_NONE);
979 RNA_def_property_enum_items(prop, rna_collection_lineart_usage);
980 RNA_def_property_ui_text(prop, "Usage", "How to use this collection in Line Art calculation");
981 RNA_def_property_update(prop, NC_SCENE, nullptr);
982
983 prop = RNA_def_property(srna, "lineart_use_intersection_mask", PROP_BOOLEAN, PROP_NONE);
984 RNA_def_property_boolean_sdna(prop, nullptr, "lineart_flags", 1);
986 prop, "Use Intersection Masks", "Use custom intersection mask for faces in this collection");
987 RNA_def_property_update(prop, NC_SCENE, nullptr);
988
989 prop = RNA_def_property(srna, "lineart_intersection_mask", PROP_BOOLEAN, PROP_NONE);
991 prop, nullptr, "lineart_intersection_mask", 1 << 0, 8);
993 prop, "Masks", "Intersection generated by this collection will have this mask value");
994 RNA_def_property_update(prop, NC_SCENE, nullptr);
995
996 prop = RNA_def_property(srna, "lineart_intersection_priority", PROP_INT, PROP_NONE);
998 "Intersection Priority",
999 "The intersection line will be included into the object with the "
1000 "higher intersection priority value");
1001 RNA_def_property_update(prop, NC_SCENE, nullptr);
1002
1003 prop = RNA_def_property(srna, "use_lineart_intersection_priority", PROP_BOOLEAN, PROP_NONE);
1006 prop, nullptr, "lineart_flags", COLLECTION_LRT_USE_INTERSECTION_PRIORITY);
1008 prop, "Use Intersection Priority", "Assign intersection priority value for this collection");
1009 RNA_def_property_update(prop, NC_SCENE, nullptr);
1010
1011 prop = RNA_def_property(srna, "color_tag", PROP_ENUM, PROP_NONE);
1012 RNA_def_property_enum_sdna(prop, nullptr, "color_tag");
1014 prop, "rna_Collection_color_tag_get", "rna_Collection_color_tag_set", nullptr);
1016 RNA_def_property_ui_text(prop, "Collection Color", "Color tag for a collection");
1017 RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_Collection_color_tag_update");
1018
1020
1025}
1026
1027#endif
bool BKE_collection_object_remove(Main *bmain, Collection *collection, Object *ob, bool free_us)
void BKE_collection_exporter_remove(Collection *collection, CollectionExport *data)
void BKE_collection_object_cache_free(const Main *bmain, Collection *collection, const int id_create_flag)
bool BKE_collection_child_remove(Main *bmain, Collection *parent, Collection *child)
bool BKE_collection_object_replace(Main *bmain, Collection *collection, Object *ob_old, Object *ob_new)
bool BKE_collection_child_add(Main *bmain, Collection *parent, Collection *child)
bool BKE_collection_exporter_move(Collection *collection, const int from, const int to)
void BKE_collection_exporter_name_set(const ListBase *exporters, CollectionExport *data, const char *newname)
CollectionExport * BKE_collection_exporter_add(Collection *collection, char *idname, char *label)
ListBase BKE_collection_object_cache_get(Collection *collection)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
IDProperty * IDP_GetPropertyFromGroup(const IDProperty *prop, blender::StringRef name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition idprop.cc:747
void IDP_FreeFromGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL()
Definition idprop.cc:741
void IDP_AssignStringMaxSize(IDProperty *prop, const char *st, size_t st_maxncpy) ATTR_NONNULL()
Definition idprop.cc:421
#define IDP_string_get(prop)
IDProperty * IDP_New(char type, const IDPropertyTemplate *val, blender::StringRef name, eIDPropertyFlag flags={}) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition idprop.cc:1009
bool IDP_AddToGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL()
Definition idprop.cc:717
IDProperty * IDP_NewStringMaxSize(const char *st, size_t st_maxncpy, blender::StringRef name, eIDPropertyFlag flags={}) ATTR_WARN_UNUSED_RESULT
Definition idprop.cc:363
void BKE_main_collection_sync(const Main *bmain)
void id_us_plus(ID *id)
Definition lib_id.cc:358
void id_us_min(ID *id)
Definition lib_id.cc:366
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
@ RPT_ERROR
Definition BKE_report.hh:39
#define BLI_STATIC_ASSERT(a, msg)
Definition BLI_assert.h:83
#define BLI_assert_msg(a, msg)
Definition BLI_assert.h:53
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define FILE_MAX
#define ARRAY_SIZE(arr)
#define UNUSED_VARS_NDEBUG(...)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
bool DEG_is_original(const T *id)
@ ID_RECALC_HIERARCHY
Definition DNA_ID.h:1158
@ ID_RECALC_SYNC_TO_EVAL
Definition DNA_ID.h:1118
@ ID_RECALC_GEOMETRY
Definition DNA_ID.h:1074
#define ID_IS_EDITABLE(_id)
Definition DNA_ID.h:705
@ LIBOVERRIDE_OP_REPLACE
Definition DNA_ID.h:230
#define ID_IS_OVERRIDE_LIBRARY(_id)
Definition DNA_ID.h:730
@ IDP_STRING
@ IDP_GROUP
Object groups, one object can be in many groups at once.
@ COLLECTION_LIGHT_LINKING_STATE_EXCLUDE
@ COLLECTION_LIGHT_LINKING_STATE_INCLUDE
@ COLLECTION_LRT_EXCLUDE
@ COLLECTION_LRT_INCLUDE
@ COLLECTION_LRT_INTERSECTION_ONLY
@ COLLECTION_LRT_FORCE_INTERSECTION
@ COLLECTION_LRT_OCCLUSION_ONLY
@ COLLECTION_LRT_NO_INTERSECTION
@ COLLECTION_HIDE_RENDER
@ COLLECTION_HIDE_SELECT
@ COLLECTION_IS_MASTER
@ COLLECTION_HIDE_VIEWPORT
@ COLLECTION_LRT_USE_INTERSECTION_PRIORITY
@ IO_HANDLER_PANEL_OPEN
@ COLLECTION_COLOR_NONE
@ COLLECTION_COLOR_02
@ COLLECTION_COLOR_05
@ COLLECTION_COLOR_07
@ COLLECTION_COLOR_06
@ COLLECTION_COLOR_TOT
@ COLLECTION_COLOR_04
@ COLLECTION_COLOR_01
@ COLLECTION_COLOR_08
@ COLLECTION_COLOR_03
Object is a sort of wrapper for general info.
@ PARM_REQUIRED
Definition RNA_types.hh:545
@ FUNC_USE_REPORTS
Definition RNA_types.hh:914
@ FUNC_USE_MAIN
Definition RNA_types.hh:912
@ STRUCT_ID_REFCOUNT
Definition RNA_types.hh:959
@ PROP_FLOAT
Definition RNA_types.hh:164
@ 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
#define RNA_TRANSLATION_PREC_DEFAULT
Definition RNA_types.hh:224
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
Definition RNA_types.hh:503
@ PROPOVERRIDE_NO_COMPARISON
Definition RNA_types.hh:511
PropertyFlag
Definition RNA_types.hh:300
@ PROP_ANIMATABLE
Definition RNA_types.hh:319
@ PROP_PATH_SUPPORTS_BLEND_RELATIVE
Definition RNA_types.hh:456
@ PROP_ENUM_NO_CONTEXT
Definition RNA_types.hh:430
@ PROP_NEVER_NULL
Definition RNA_types.hh:377
@ PROP_NO_DEG_UPDATE
Definition RNA_types.hh:439
@ PROP_NONE
Definition RNA_types.hh:233
@ PROP_TRANSLATION
Definition RNA_types.hh:261
@ PROP_UNSIGNED
Definition RNA_types.hh:249
@ PROP_FILEPATH
Definition RNA_types.hh:236
#define ND_DRAW
Definition WM_types.hh:461
#define ND_OB_SELECT
Definition WM_types.hh:442
#define ND_SPACE_PROPERTIES
Definition WM_types.hh:529
#define NC_SCENE
Definition WM_types.hh:378
#define ND_LAYER_CONTENT
Definition WM_types.hh:453
#define NC_OBJECT
Definition WM_types.hh:379
#define NC_SPACE
Definition WM_types.hh:392
BMesh const char void * data
#define offsetof(t, d)
static char ** types
Definition makesdna.cc:71
FileHandlerType * file_handler_find(StringRef idname)
Span< std::unique_ptr< FileHandlerType > > file_handlers()
const char * name
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, ListBase *lb, IteratorSkipFunc skip)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_id_pointer_create(ID *id)
static void rna_def_collection_child(BlenderRNA *brna)
static void rna_def_collection_objects(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_collection_object(BlenderRNA *brna)
static void rna_def_collection_exporter_data(BlenderRNA *brna)
static void rna_def_collection_children(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_collections(BlenderRNA *brna)
static void rna_def_collection_light_linking(BlenderRNA *brna)
static void rna_def_collection_exporters(BlenderRNA *brna, PropertyRNA *cprop)
const EnumPropertyItem rna_enum_collection_color_items[]
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
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_define_lib_overridable(const bool make_overridable)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
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_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
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_bitset_array_sdna(PropertyRNA *prop, const char *structname, const char *propname, const int64_t booleanbit, const int length)
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
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)
void RNA_def_struct_clear_flag(StructRNA *srna, int flag)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
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_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
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_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_override_funcs(PropertyRNA *prop, const char *diff, const char *store, const char *apply)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_override_clear_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
Definition rna_rna.cc:26
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
Definition rna_rna.cc:32
struct Collection * collection
union CollectionPropertyIterator::@220100362304005352221007113371015217044252346141 internal
ListBaseIterator listbase
Definition RNA_types.hh:606
char type
Definition DNA_ID.h:156
char name[258]
Definition DNA_ID.h:432
ID * owner_id
Definition RNA_types.hh:51
IDOverrideLibraryPropertyOperation * liboverride_operation
char export_operator[OP_MAX_TYPENAME]
i
Definition text_draw.cc:230
void WM_main_add_notifier(uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4238
wmOperatorType * ot
Definition wm_files.cc:4237
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
uint8_t flag
Definition wm_window.cc:145