10#define DNA_DEPRECATED_ALLOW
72 const int id_create_flag,
78 const int id_create_flag);
84 const int id_create_flag,
91 const int id_create_flag,
105 const int id_create_flag,
106 const uint id_recalc_flag);
139 std::optional<Library *> ,
155 collection_dst->
preview =
nullptr;
170 bmain, collection_dst, child->collection, &child->light_linking,
flag,
false);
188 if (collection->runtime.gobject_hash) {
189 BLI_ghash_free(collection->runtime.gobject_hash,
nullptr,
nullptr);
190 collection->runtime.gobject_hash =
nullptr;
212 collection->owner_id,
216 Object *cob_ob_old = cob->ob;
221 if (collection->runtime.gobject_hash) {
227 else if (cob_ob_old != cob->ob || cob->ob ==
nullptr) {
242 const int cb_flag = ((parent->collection !=
nullptr &&
260 if (debug_relationship_assert) {
266 return &master_collection->
owner_id;
271 memset(&collection->runtime, 0,
sizeof(collection->runtime));
273 collection->flag &= ~COLLECTION_FLAG_ALL_RUNTIME;
293 if (data->export_properties) {
331 "Fixing root node tree '%s' owned by '%s' missing EMBEDDED tag, please consider "
332 "re-saving your (startup) file",
339 memset(&collection->runtime, 0,
sizeof(collection->runtime));
340 collection->flag &= ~COLLECTION_FLAG_ALL_RUNTIME;
342 collection->owner_id = owner_id;
368 BLI_assert(collection->runtime.gobject_hash ==
nullptr);
370 if (cob->ob ==
nullptr) {
378 BLI_assert(collection->runtime.gobject_hash ==
nullptr);
379 collection->runtime.tag &= ~COLLECTION_TAG_COLLECTION_OBJECT_DIRTY;
421 const char *name_custom)
440 if (collection_parent) {
459 bool is_instantiated =
false;
466 is_instantiated =
true;
471 if (!is_instantiated) {
483 bool is_instantiated =
false;
490 is_instantiated =
true;
495 is_instantiated =
true;
500 if (!is_instantiated) {
524 if (newname && newname[0] !=
'\0') {
535 if (data->export_properties) {
552 if (collection->runtime.gobject_hash) {
553 BLI_ghash_free(collection->runtime.gobject_hash,
nullptr,
nullptr);
554 collection->runtime.gobject_hash =
nullptr;
560 while (cob !=
nullptr) {
568 while (child !=
nullptr) {
583 while (cob !=
nullptr) {
614 const int id_create_flag,
619 bool do_full_process =
false;
624 if (is_collection_master) {
628 collection_new = collection_old;
629 do_full_process =
true;
631 else if (collection_old->
id.
newid ==
nullptr) {
633 bmain, (
ID *)collection_old, duplicate_flags, id_create_flag);
635 if (collection_new == collection_old) {
636 return collection_new;
639 do_full_process =
true;
647 if (parent !=
nullptr) {
661 if (child && child_new) {
671 if (!do_full_process) {
672 return collection_new;
683 if (ob_old->
id.
newid ==
nullptr) {
697 if (
ELEM(ob_new, ob_old,
nullptr)) {
702 bmain, collection_new, ob_new, &cob->
light_linking, id_create_flag,
true);
710 Collection *child_collection_old = child_iter->collection;
714 child_collection_old,
719 if (child_collection_new != child_collection_old) {
724 return collection_new;
731 uint duplicate_flags,
732 uint duplicate_options)
738 if (!is_subprocess) {
747 duplicate_options &= ~LIB_ID_DUPLICATE_IS_ROOT_ID;
759 if (!is_subprocess) {
762 collection_new->
id.
tag &= ~ID_TAG_NEW;
784 return collection_new;
797 if (!collection_parent) {
807 const int max_len =
sizeof(collection_parent->
id.
name) - 1 -
819 return IFACE_(
"Scene Collection");
822 return collection->id.name + 2;
836 int child_restrict = collection->flag | parent_restrict;
841 if (base ==
nullptr) {
845 if (with_instances && cob->ob->instance_collection) {
847 lb, cob->ob->instance_collection, child_restrict, with_instances);
880 return collection->runtime.object_cache;
891 &collection->runtime.object_cache_instanced, collection, 0,
true);
897 return collection->runtime.object_cache_instanced;
902 const int id_create_flag,
903 const uint id_recalc_flag)
928 const int id_create_flag,
929 const uint id_recalc_flag)
938 if (parent->collection ==
nullptr) {
942 bmain, parent->collection, id_create_flag, id_recalc_flag);
948 const int id_create_flag)
958 scene =
static_cast<Scene *
>(scene->id.next))
965 collection !=
nullptr;
966 collection =
static_cast<Collection *
>(collection->id.next))
991 BLI_assert(scene !=
nullptr && scene->master_collection ==
nullptr);
997 master_collection->
owner_id = &scene->id;
1003 return master_collection;
1014 if (object->instance_collection) {
1015 Collection *dup_collection =
object->instance_collection;
1021 dup_collection->
id.
tag &= ~ID_TAG_DOIT;
1023 if (dup_collection == collection) {
1057 if (
ELEM(
nullptr, collection, ob)) {
1066 if (
ELEM(
nullptr, collection, ob)) {
1076 if (
ELEM(
nullptr, collection, ob)) {
1100 if (scene && collection == scene->master_collection) {
1104 return static_cast<Collection *
>(collection->id.next);
1116 collection = scene->master_collection;
1122 while (collection) {
1144 const bool do_extensive_check);
1155 if (
UNLIKELY(cob->ob ==
nullptr)) {
1167 collection->runtime.gobject_hash = gobject_hash;
1172 if (collection->runtime.gobject_hash) {
1173#ifdef USE_DEBUG_EXTRA_GOBJECT_ASSERT
1190 bool changed =
false;
1193#ifdef USE_DEBUG_EXTRA_GOBJECT_ASSERT
1199 GHash *gobject_hash = collection->runtime.gobject_hash;
1208 if (cob->ob ==
nullptr) {
1226 collection->runtime.tag &= ~COLLECTION_TAG_COLLECTION_OBJECT_DIRTY;
1248 if (ob_old == cob->
ob) {
1255 if (cob_old != cob) {
1291 const bool do_extensive_check)
1294 if (!do_extensive_check) {
1298 if (collection->runtime.gobject_hash ==
nullptr) {
1303 GHash *gobject_hash = collection->runtime.gobject_hash;
1330 if (view_layer !=
nullptr &&
1337 return collection_parent->collection;
1340 view_layer, collection_parent->collection);
1341 if (editable_collection !=
nullptr) {
1342 return editable_collection;
1353 const int id_create_flag,
1374 if (light_linking) {
1399 const int id_create_flag,
1420 if (cob ==
nullptr) {
1429 CollectionExport *new_data = MEM_cnew<CollectionExport>(
"CollectionExport");
1432 new_data->
flag = data->flag;
1445 if (ob ==
nullptr) {
1452 if (collection ==
nullptr) {
1478 if (collection ==
nullptr) {
1484 if (collection ==
nullptr) {
1493 bool is_instantiated =
false;
1500 is_instantiated =
true;
1505 if (!is_instantiated) {
1519 if (
ELEM(
nullptr, collection, ob)) {
1544 if (cob ==
nullptr) {
1573 bool removed =
false;
1578 if (collection_skip ==
nullptr) {
1586 if (collection == collection_skip) {
1618 if (child->collection ==
nullptr) {
1627 if ((parent->collection ==
nullptr) ||
1639 if (child_collection ==
nullptr) {
1640 if (parent_collection !=
nullptr) {
1679 if (collection_src !=
nullptr) {
1731 if (collection_object->ob !=
nullptr &&
1733 ELEM(collection_object->ob->instance_collection, instance_collection, collection))
1740 if (collection_child->collection !=
nullptr &&
1752 if (collection == new_ancestor) {
1756 if (collection ==
nullptr) {
1757 collection = new_ancestor;
1774 bool cycles_found =
false;
1777 if (collection_object->ob !=
nullptr &&
1778 collection_object->ob->instance_collection == collection)
1781 collection_object->ob->instance_collection =
nullptr;
1782 cycles_found =
true;
1788 cycles_found =
true;
1792 return cycles_found;
1799 bool cycles_found =
false;
1804 cycles_found =
true;
1807 cycles_found =
true;
1811 return cycles_found;
1829 if (child->collection == collection) {
1856 const int id_create_flag,
1869 if (light_linking) {
1879 BLI_addtail(&collection->runtime.parents, cparent);
1894 const int id_create_flag)
1897 if (child ==
nullptr) {
1942 if (other_child != child) {
1963 BLI_addtail(&child->collection->runtime.parents, cparent);
1975 collection->runtime.tag &= ~COLLECTION_TAG_RELATION_REBUILD;
2001 if (scene->master_collection !=
nullptr) {
2042 *r_key = child->collection;
2054 *r_key = parent->collection;
2072 if (index == (*index_current)) {
2080 if (nested !=
nullptr) {
2089 int index_current = 0;
2090 Collection *master_collection = scene->master_collection;
2099 bool changed =
false;
2112 base->
flag &= ~BASE_SELECTED;
2142 if (layer_collection !=
nullptr) {
2159 bool relative_after,
2181 if (relative_child) {
2184 if (relative_after) {
2228 int *tot =
static_cast<int *
>(
data);
2235 **
array = collection;
2241 int *r_collections_array_len)
2243 *r_collections_array =
nullptr;
2244 *r_collections_array_len = 0;
2246 if (scene ==
nullptr) {
2250 Collection *collection = scene->master_collection;
2258 *r_collections_array =
array;
2264 Scene *scene =
static_cast<Scene *
>(data_in);
2277 iter->
current = data->array[data->cur];
2284 if (++data->cur < data->tot) {
2285 iter->
current = data->array[data->cur];
2288 iter->
valid =
false;
2302 iter->
valid =
false;
2322 if (visited_objects !=
nullptr) {
2323 data->visited = visited_objects;
2333 data->cob_next =
static_cast<CollectionObject *
>(collection->gobject.first);
2340 Scene *scene =
static_cast<Scene *
>(data_in);
2353 iter->
data = data->iter_data;
2356 if (ob && (ob->
flag & data->flag) == 0) {
2361 data->iter_data = iter->
data;
2372 data->iter_data = iter->
data;
2373 iter->
data = data_in;
2382 iter->
data = data->iter_data;
2387 data->iter_data = iter->
data;
2397 iter->
data = data->iter_data;
2402 data->iter_data = iter->
data;
2411 for (; cob !=
nullptr; cob = cob->
next) {
2429 data->cob_next = cob->
next;
2437 collection =
static_cast<Collection *
>(data->scene_collection_iter.current);
2440 data->visited,
static_cast<CollectionObject *
>(collection->gobject.first));
2442 data->cob_next = new_cob->
next;
2447 }
while (data->scene_collection_iter.valid);
2449 if (!data->scene_collection_iter.valid) {
2450 iter->
valid =
false;
2460 if (data->visited !=
nullptr) {
2471 while (iter.
valid) {
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
void(*)(Collection *ob, void *data) BKE_scene_collections_Cb
#define FOREACH_SCENE_COLLECTION_END
#define FOREACH_SCENE_COLLECTION_BEGIN(scene, _instance)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object)
#define BKE_SCENE_COLLECTION_NAME
void IDP_AssignString(IDProperty *prop, const char *st) ATTR_NONNULL()
IDProperty * IDP_GetPropertyFromGroup(const IDProperty *prop, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
#define IDP_BlendDataRead(reader, prop)
void IDP_FreeProperty(IDProperty *prop)
IDProperty * IDP_CopyProperty(const IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_BlendWrite(BlendWriter *writer, const IDProperty *prop)
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
@ IDTYPE_FLAGS_NO_ANIMDATA
LayerCollection * BKE_layer_collection_first_from_scene_collection(const ViewLayer *view_layer, const Collection *collection)
bool BKE_view_layer_has_collection(const ViewLayer *view_layer, const Collection *collection)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
bool BKE_layer_collection_objects_select(const Scene *scene, ViewLayer *view_layer, LayerCollection *lc, bool deselect)
void BKE_main_collection_sync(const Main *bmain)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
ListBase * BKE_view_layer_object_bases_get(ViewLayer *view_layer)
ID * BKE_id_copy_for_duplicate(Main *bmain, ID *id, eDupli_ID_Flags duplicate_flags, int copy_flags)
void BKE_id_delete(Main *bmain, void *idv) ATTR_NONNULL()
void BKE_id_free_us(Main *bmain, void *idv) ATTR_NONNULL()
@ LIB_ID_CREATE_NO_USER_REFCOUNT
@ LIB_ID_CREATE_NO_DEG_TAG
void BKE_libblock_free_data(ID *id, bool do_id_user) ATTR_NONNULL()
void BKE_main_id_newptr_and_tag_clear(Main *bmain)
void * BKE_id_new(Main *bmain, short type, const char *name)
void * BKE_libblock_alloc_in_lib(Main *bmain, std::optional< Library * > owner_library, short type, const char *name, int flag) ATTR_WARN_UNUSED_RESULT
void BKE_main_id_tag_listbase(ListBase *lb, int tag, bool value)
@ LIB_ID_DUPLICATE_IS_ROOT_ID
@ LIB_ID_DUPLICATE_IS_SUBPROCESS
void BKE_id_blend_write(BlendWriter *writer, ID *id)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_EMBEDDED_NOT_OWNING
@ IDWALK_CB_OVERRIDE_LIBRARY_HIERARCHY_DEFAULT
@ IDWALK_CB_READFILE_IGNORE
int BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data)
@ IDWALK_NO_ORIG_POINTERS_ACCESS
#define BKE_LIB_FOREACHID_PROCESS_ID(data_, id_, cb_flag_)
void BKE_libblock_relink_to_newid(Main *bmain, ID *id, int remap_flag) ATTR_NONNULL()
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
General operations, lookup, etc. for blender objects.
Object * BKE_object_duplicate(Main *bmain, Object *ob, eDupli_ID_Flags dupflag, uint duplicate_options)
void BKE_previewimg_blend_write(BlendWriter *writer, const PreviewImage *prv)
void BKE_previewimg_free(PreviewImage **prv)
void BKE_previewimg_blend_read(BlendDataReader *reader, PreviewImage *prv)
void BKE_previewimg_id_copy(ID *new_id, const ID *old_id)
API for Blender-side Rigid Body stuff.
void BKE_rigidbody_main_collection_object_add(struct Main *bmain, struct Collection *collection, struct Object *object)
void BKE_scene_remove_rigidbody_object(Main *bmain, Scene *scene, Object *ob, bool free_us)
#define BLI_assert_msg(a, msg)
GSet * BLI_gset_ptr_new(const char *info)
bool BLI_ghash_haskey(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
bool BLI_gset_ensure_p_ex(GSet *gs, const void *key, void ***r_key)
void BLI_gset_clear(GSet *gs, GSetKeyFreeFP keyfreefp)
void * BLI_ghash_popkey(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_ptr_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghash_len(const GHash *gh) ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
void BLI_ghash_clear_ex(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp, unsigned int nentries_reserve)
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
#define BLI_ITERATOR_INIT(iter)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
bool BLI_listbase_validate(struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
ListBase BLI_listbase_from_link(struct Link *some_link)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int integer_digits_i(int i)
char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
#define STRNCPY(dst, src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void BLI_uniquename(const struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_maxncpy) ATTR_NONNULL(1
#define BLI_MUTEX_INITIALIZER
void BLI_mutex_lock(ThreadMutex *mutex)
void BLI_mutex_unlock(ThreadMutex *mutex)
pthread_mutex_t ThreadMutex
#define UNUSED_VARS_NDEBUG(...)
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
int BLO_read_fileversion_get(BlendDataReader *reader)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define BLO_read_struct_list(reader, struct_name, list)
#define BLO_read_struct(reader, struct_name, ptr_p)
#define BLT_I18NCONTEXT_ID_COLLECTION
#define CLOG_WARN(clg_ref,...)
void DEG_id_tag_update_ex(Main *bmain, ID *id, unsigned int flags)
ID * DEG_get_original_id(ID *id)
ID and Library types, which are fundamental for SDNA.
#define ID_IS_OVERRIDABLE_LIBRARY(_id)
#define ID_IS_LINKED(_id)
#define ID_IS_EDITABLE(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
Object groups, one object can be in many groups at once.
@ COLLECTION_TAG_COLLECTION_OBJECT_DIRTY
@ COLLECTION_TAG_RELATION_REBUILD
@ COLLECTION_HAS_OBJECT_CACHE_INSTANCED
@ COLLECTION_HAS_OBJECT_CACHE
@ COLLECTION_HIDE_VIEWPORT
struct Collection Collection
#define DNA_struct_default_get(struct_name)
Object is a sort of wrapper for general info.
Types and defines for representing Rigid Body entities.
#define BASE_SELECTED(v3d, base)
#define BASE_SELECTABLE(v3d, base)
Read Guarded memory(de)allocation.
static void collection_object_cache_fill(ListBase *lb, Collection *collection, int parent_restrict, bool with_instances)
static bool collection_object_add(Main *bmain, Collection *collection, Object *ob, CollectionLightLinking *light_linking, const int id_create_flag, const bool add_us)
static bool collection_cycle_fix_recursive(Main *bmain, Collection *parent_collection, Collection *collection)
static Collection * collection_from_index_recursive(Collection *collection, const int index, int *index_current)
static bool collection_child_remove(Main *bmain, Collection *parent, Collection *collection, const int id_create_flag)
bool BKE_collection_has_object_recursive_instanced(Collection *collection, Object *ob)
static Collection * collection_duplicate_recursive(Main *bmain, Collection *parent, Collection *collection_old, CollectionChild *child_old, const int id_create_flag, const eDupli_ID_Flags duplicate_flags, const eLibIDDuplicateFlags duplicate_options)
static CollectionObject * object_base_unique(GSet *gs, CollectionObject *cob)
void BKE_scene_objects_iterator_begin_ex(BLI_Iterator *iter, void *data_in)
void BKE_scene_objects_iterator_next_ex(BLI_Iterator *iter)
Collection * BKE_collection_master_add(Scene *scene)
static CollectionParent * collection_find_parent(Collection *child, Collection *collection)
void BKE_collection_object_cache_free(const Main *bmain, Collection *collection, const int id_create_flag)
bool BKE_collection_has_object_recursive(Collection *collection, Object *ob)
static void collection_exporter_copy(Collection *collection, CollectionExport *data)
static void collection_gobject_assert_internal_consistency(Collection *collection, const bool do_extensive_check)
CollectionChild * BKE_collection_child_find(Collection *parent, Collection *collection)
void BKE_collection_add_from_collection(Main *bmain, Scene *scene, Collection *collection_src, Collection *collection_dst)
const char * BKE_collection_ui_name_get(Collection *collection)
static Collection * collection_add(Main *bmain, Collection *collection_parent, const char *name_custom)
void BKE_collection_exporter_free_data(CollectionExport *data)
bool BKE_collection_has_object_recursive_instanced_orig_id(Collection *collection_eval, Object *object_eval)
static ID ** collection_owner_pointer_get(ID *id, const bool debug_relationship_assert)
void BKE_collection_blend_write_nolib(BlendWriter *writer, Collection *collection)
bool BKE_collection_child_remove(Main *bmain, Collection *parent, Collection *child)
bool BKE_collection_viewlayer_object_add(Main *bmain, const ViewLayer *view_layer, Collection *collection, Object *ob)
void BKE_scene_collections_iterator_next(BLI_Iterator *iter)
static GHash * collection_gobject_hash_alloc(const Collection *collection)
static bool collection_instance_find_recursive(Collection *collection, Collection *instance_collection)
Collection * BKE_collection_add(Main *bmain, Collection *collection_parent, const char *name_custom)
bool BKE_collection_has_object(Collection *collection, const Object *ob)
static void collection_copy_data(Main *bmain, std::optional< Library * >, ID *id_dst, const ID *id_src, const int flag)
ListBase BKE_collection_object_cache_instanced_get(Collection *collection)
void BKE_collections_object_remove_invalids(Main *bmain)
Base * BKE_collection_or_layer_objects(const Scene *scene, ViewLayer *view_layer, Collection *collection)
void BKE_scene_objects_iterator_end(BLI_Iterator *iter)
bool BKE_collection_object_replace(Main *bmain, Collection *collection, Object *ob_old, Object *ob_new)
bool BKE_collection_is_empty(const Collection *collection)
static void collection_parents_rebuild_recursive(Collection *collection)
static void collection_gobject_hash_ensure_fix(Main *bmain, Collection *collection)
bool BKE_collection_move(Main *bmain, Collection *to_parent, Collection *from_parent, Collection *relative, bool relative_after, Collection *collection)
bool BKE_collection_is_in_scene(Collection *collection)
static void scene_collection_callback(Collection *collection, BKE_scene_collections_Cb callback, void *data)
bool BKE_collection_child_add(Main *bmain, Collection *parent, Collection *child)
void BKE_collection_object_move(Main *bmain, Scene *scene, Collection *collection_dst, Collection *collection_src, Object *ob)
void BKE_collection_add_from_object(Main *bmain, Scene *scene, const Object *ob_src, Collection *collection_dst)
static Collection * collection_next_find(Main *bmain, Scene *scene, Collection *collection)
static bool collection_child_add(Main *bmain, Collection *parent, Collection *collection, const CollectionLightLinking *light_linking, const int id_create_flag, const bool add_us)
static bool collection_object_cyclic_check_internal(Object *object, Collection *collection)
bool BKE_scene_collections_object_remove(Main *bmain, Scene *scene, Object *ob, const bool free_us)
void BKE_collections_child_remove_nulls(Main *bmain, Collection *parent_collection, Collection *child_collection)
void BKE_collection_exporter_name_set(const ListBase *exporters, CollectionExport *data, const char *newname)
GSet * BKE_scene_objects_as_gset(Scene *scene, GSet *objects_gset)
bool BKE_collection_validate(Collection *collection)
bool BKE_collection_object_remove(Main *bmain, Collection *collection, Object *ob, const bool free_us)
bool BKE_collection_child_add_no_sync(Main *bmain, Collection *parent, Collection *child)
void BKE_collection_blend_write_prepare_nolib(BlendWriter *, Collection *collection)
static void collection_gobject_hash_create(Collection *collection)
void BKE_scene_collections_iterator_begin(BLI_Iterator *iter, void *data_in)
void BKE_collection_new_name_get(Collection *collection_parent, char *rname)
void BKE_collection_free_data(Collection *collection)
static bool collection_objects_select(const Scene *scene, ViewLayer *view_layer, Collection *collection, bool deselect)
static bool collection_find_child_recursive(const Collection *parent, const Collection *collection)
static void collection_gobject_hash_ensure(Collection *collection)
static void scene_collections_count(Collection *, void *data)
void BKE_main_collections_object_cache_free(const Main *bmain)
Collection * BKE_collection_object_find(Main *bmain, Scene *scene, Collection *collection, Object *ob)
Collection * BKE_collection_from_index(Scene *scene, const int index)
static void collection_gobject_hash_update_object(Collection *collection, Object *ob_old, CollectionObject *cob)
void BKE_scene_collections_iterator_end(BLI_Iterator *iter)
bool BKE_collection_cycles_fix(Main *bmain, Collection *collection)
static bool collection_object_remove(Main *bmain, Collection *collection, Object *ob, const int id_create_flag, const bool free_us)
bool BKE_collection_object_add_notest(Main *bmain, Collection *collection, Object *ob)
void BKE_scene_objects_iterator_end_ex(BLI_Iterator *iter)
static void collection_free_data(ID *id)
static bool collection_instance_fix_recursive(Collection *parent_collection, Collection *collection)
void BKE_collection_object_add_from(Main *bmain, Scene *scene, Object *ob_src, Object *ob_dst)
static void collection_blend_read_data(BlendDataReader *reader, ID *id)
Collection * BKE_collection_parent_editable_find_recursive(const ViewLayer *view_layer, Collection *collection)
static void scene_collections_array(Scene *scene, Collection ***r_collections_array, int *r_collections_array_len)
static void collection_object_cache_free(const Main *bmain, Collection *collection, const int id_create_flag, const uint id_recalc_flag)
bool BKE_collection_delete(Main *bmain, Collection *collection, bool hierarchy)
bool BKE_collection_cycle_find(Collection *new_ancestor, Collection *collection)
static void scene_objects_iterator_begin(BLI_Iterator *iter, Scene *scene, GSet *visited_objects)
static void collection_null_children_remove(Collection *collection)
Collection * BKE_collection_duplicate(Main *bmain, Collection *parent, CollectionChild *child_old, Collection *collection, uint duplicate_flags, uint duplicate_options)
static void collection_blend_write(BlendWriter *writer, ID *id, const void *id_address)
bool BKE_collection_object_cyclic_check(Main *bmain, Object *object, Collection *collection)
static void collection_missing_parents_remove(Collection *collection)
void BKE_collections_after_lib_link(Main *bmain)
bool BKE_collection_has_collection(const Collection *parent, const Collection *collection)
static void scene_collections_build_array(Collection *collection, void *data)
static void collection_object_remove_no_gobject_hash(Main *bmain, Collection *collection, CollectionObject *cob, const int id_create_flag, const bool free_us)
static bool scene_collections_object_remove(Main *bmain, Scene *scene, Object *ob, const bool free_us, Collection *collection_skip)
static void collection_init_data(ID *id)
static void collection_object_cache_free_parent_recursive(const Main *bmain, Collection *collection, const int id_create_flag, const uint id_recalc_flag)
ListBase BKE_collection_object_cache_get(Collection *collection)
void BKE_collection_blend_read_data(BlendDataReader *reader, Collection *collection, ID *owner_id)
void BKE_scene_objects_iterator_begin(BLI_Iterator *iter, void *data_in)
void BKE_collection_parent_relations_rebuild(Collection *collection)
bool BKE_collection_objects_select(const Scene *scene, ViewLayer *view_layer, Collection *collection, bool deselect)
static void scene_objects_iterator_skip_invalid_flag(BLI_Iterator *iter)
static void collection_blend_read_after_liblink(BlendLibReader *, ID *id)
void BKE_scene_objects_iterator_next(BLI_Iterator *iter)
static void collection_foreach_id(ID *id, LibraryForeachIDData *data)
void BKE_main_collections_parent_relations_rebuild(Main *bmain)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
DEGForeachIDComponentCallback callback
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
struct Collection * collection
CollectionLightLinking light_linking
IDProperty * export_properties
struct CollectionObject * next
CollectionLightLinking light_linking
struct Collection * collection
struct GHash * gobject_hash
ListBase object_cache_instanced
struct PreviewImage * preview
Collection_Runtime runtime
struct Collection * instance_collection
LightLinking * light_linking
BLI_Iterator scene_collection_iter
CollectionObject * cob_next