96 static void rna_Collection_objects_link(
Collection *collection,
105 "Could not link the object '%s' because the collection '%s' is overridden",
113 "Could not link the object '%s' because the collection '%s' is linked",
121 "Object '%s' already in collection '%s'",
132 static void rna_Collection_objects_unlink(
Collection *collection,
140 "Object '%s' not in collection '%s'",
151 static bool rna_Collection_objects_override_apply(
Main *bmain,
158 const int UNUSED(len_dst),
159 const int UNUSED(len_src),
160 const int UNUSED(len_storage),
167 "Unsupported RNA override operation on collections' objects");
180 if (ob_src == ob_dst) {
187 if (cob_dst ==
NULL) {
188 BLI_assert(0 &&
"Could not find destination object in destination collection!");
195 cob_dst->
ob = ob_src;
220 static void rna_Collection_children_link(
Collection *collection,
228 "Collection '%s' already in collection '%s'",
239 static void rna_Collection_children_unlink(
Collection *collection,
247 "Collection '%s' not in collection '%s'",
258 static bool rna_Collection_children_override_apply(
Main *bmain,
265 const int UNUSED(len_dst),
266 const int UNUSED(len_src),
267 const int UNUSED(len_storage),
274 "Unsupported RNA override operation on collections' children");
290 if (collchild_dst ==
NULL) {
291 BLI_assert(0 &&
"Could not find destination sub-collection in destination collection!");
307 static void rna_Collection_flag_set(
PointerRNA *
ptr,
const bool value,
const int flag)
316 collection->
flag |= flag;
319 collection->
flag &= ~flag;
323 static void rna_Collection_hide_select_set(
PointerRNA *
ptr,
bool value)
328 static void rna_Collection_hide_viewport_set(
PointerRNA *
ptr,
bool value)
333 static void rna_Collection_hide_render_set(
PointerRNA *
ptr,
bool value)
349 static int rna_Collection_color_tag_get(
struct PointerRNA *
ptr)
356 static void rna_Collection_color_tag_set(
struct PointerRNA *
ptr,
int value)
367 static void rna_Collection_color_tag_update(
Main *
UNUSED(bmain),
399 parm =
RNA_def_pointer(func,
"object",
"Object",
"",
"Object to remove");
419 parm =
RNA_def_pointer(func,
"child",
"Collection",
"",
"Collection to add");
426 parm =
RNA_def_pointer(func,
"child",
"Collection",
"",
"Collection to remove");
446 prop,
"Instance Offset",
"Offset from the origin to use when instancing");
455 "rna_Collection_objects_begin",
456 "rna_iterator_listbase_next",
457 "rna_iterator_listbase_end",
458 "rna_Collection_objects_get",
468 prop,
"All Objects",
"Objects that are in this collection and its child collections");
472 "rna_Collection_all_objects_begin",
473 "rna_iterator_listbase_next",
474 "rna_iterator_listbase_end",
475 "rna_Collection_all_objects_get",
485 prop,
"Children",
"Collections that are immediate children of this collection");
487 "rna_Collection_children_begin",
488 "rna_iterator_listbase_next",
489 "rna_iterator_listbase_end",
490 "rna_Collection_children_get",
527 "Generate feature lines for this collection"},
532 "Only use the collection to produce occlusion"},
538 "Only generate intersection lines for this collection"},
543 "Include this collection but do not generate intersection lines"},
554 prop,
"rna_Collection_color_tag_get",
"rna_Collection_color_tag_set",
NULL);
struct ListBase BKE_collection_object_cache_get(struct Collection *collection)
bool BKE_collection_child_add(struct Main *bmain, struct Collection *parent, struct Collection *child)
void BKE_collection_object_cache_free(struct Collection *collection)
bool BKE_collection_object_add(struct Main *bmain, struct Collection *collection, struct Object *ob)
bool BKE_collection_child_remove(struct Main *bmain, struct Collection *parent, struct Collection *child)
bool BKE_collection_is_in_scene(struct Collection *collection)
bool BKE_collection_object_remove(struct Main *bmain, struct Collection *collection, struct Object *object, const bool free_us)
void BKE_main_collection_sync(const struct Main *bmain)
void id_us_min(struct ID *id)
void id_us_plus(struct ID *id)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define UNUSED_VARS_NDEBUG(...)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_COPY_ON_WRITE
#define ID_IS_LINKED(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ IDOVERRIDE_LIBRARY_OP_REPLACE
Object groups, one object can be in many groups at once.
@ COLLECTION_LRT_INTERSECTION_ONLY
@ COLLECTION_LRT_OCCLUSION_ONLY
@ COLLECTION_LRT_NO_INTERSECTION
@ COLLECTION_RESTRICT_RENDER
@ COLLECTION_RESTRICT_VIEWPORT
@ COLLECTION_RESTRICT_SELECT
Object is a sort of wrapper for general info.
#define RNA_TRANSLATION_PREC_DEFAULT
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
static void rna_def_collection_objects(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_collection_children(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_collections(BlenderRNA *brna)
const EnumPropertyItem rna_enum_collection_color_items[]
void RNA_define_lib_overridable(const bool make_overridable)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
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)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
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)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_struct_clear_flag(StructRNA *srna, int flag)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
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_override_clear_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
struct Collection * collection
union CollectionPropertyIterator::@1099 internal
ListBaseIterator listbase
void WM_main_add_notifier(unsigned int type, void *reference)