10#define DNA_DEPRECATED_ALLOW
75 const int id_create_flag,
81 const int id_create_flag);
87 const int id_create_flag,
94 const int id_create_flag,
108 const int id_create_flag,
109 const uint id_recalc_flag);
129 collection->
runtime = MEM_new<blender::bke::CollectionRuntime>(__func__);
143 std::optional<Library *> ,
151 collection_dst->
runtime = MEM_new<blender::bke::CollectionRuntime>(__func__);
161 collection_dst->
preview =
nullptr;
172 bmain, collection_dst, child->collection, &child->light_linking,
flag,
false);
190 if (collection->
runtime->gobject_hash) {
192 collection->
runtime->gobject_hash =
nullptr;
206 MEM_delete(collection->
runtime);
220 Object *cob_ob_old = cob->ob;
225 if (collection->
runtime->gobject_hash) {
231 else if (cob_ob_old != cob->ob || cob->ob ==
nullptr) {
264 if (debug_relationship_assert) {
270 return &master_collection->
owner_id;
297 if (
data->export_properties) {
335 "Fixing root node tree '%s' owned by '%s' missing EMBEDDED tag, please consider "
336 "re-saving your (startup) file",
343 collection->
runtime = MEM_new<blender::bke::CollectionRuntime>(__func__);
374 if (cob->ob ==
nullptr) {
426 const char *name_custom)
445 if (collection_parent) {
464 bool is_instantiated =
false;
471 is_instantiated =
true;
476 if (!is_instantiated) {
488 bool is_instantiated =
false;
495 is_instantiated =
true;
500 is_instantiated =
true;
505 if (!is_instantiated) {
529 if (newname && newname[0] !=
'\0') {
540 if (
data->export_properties) {
557 if (collection->
runtime->gobject_hash) {
559 collection->
runtime->gobject_hash =
nullptr;
565 while (cob !=
nullptr) {
573 while (child !=
nullptr) {
588 while (cob !=
nullptr) {
619 const int id_create_flag,
624 bool do_full_process =
false;
629 if (is_collection_master) {
633 collection_new = collection_old;
634 do_full_process =
true;
636 else if (collection_old->
id.
newid ==
nullptr) {
638 bmain, (
ID *)collection_old, duplicate_flags, id_create_flag);
640 if (collection_new == collection_old) {
641 return collection_new;
644 do_full_process =
true;
652 if (parent !=
nullptr) {
666 if (child && child_new) {
676 if (!do_full_process) {
677 return collection_new;
688 if (ob_old->
id.
newid ==
nullptr) {
702 if (
ELEM(ob_new, ob_old,
nullptr)) {
707 bmain, collection_new, ob_new, &cob->
light_linking, id_create_flag,
true);
715 Collection *child_collection_old = child_iter->collection;
719 child_collection_old,
724 if (child_collection_new != child_collection_old) {
729 return collection_new;
737 uint duplicate_options)
743 if (!is_subprocess) {
764 if (!is_subprocess) {
796 return collection_new;
808 if (!collection_parent) {
814 DATA_(
"Collection %d"),
820 const size_t name_part_maxncpy = name_maxncpy - (1 + digits);
822 r_name, collection_parent->
id.
name + 2, name_part_maxncpy);
823 BLI_snprintf(r_name + name_part_len, name_maxncpy - name_part_len,
" %d", number);
830 return IFACE_(
"Scene Collection");
833 return collection->
id.
name + 2;
847 int child_restrict = collection->
flag | parent_restrict;
852 if (base ==
nullptr) {
856 if (with_instances && cob->ob->instance_collection) {
858 lb, cob->ob->instance_collection, child_restrict, with_instances);
883 std::scoped_lock
lock(cache_lock);
890 return collection->
runtime->object_cache;
898 std::scoped_lock
lock(cache_lock);
901 &collection->
runtime->object_cache_instanced, collection, 0,
true);
906 return collection->
runtime->object_cache_instanced;
911 const int id_create_flag,
912 const uint id_recalc_flag)
937 const int id_create_flag,
938 const uint id_recalc_flag)
947 if (parent->collection ==
nullptr) {
951 bmain, parent->collection, id_create_flag, id_recalc_flag);
957 const int id_create_flag)
967 scene =
static_cast<Scene *
>(scene->id.next))
974 collection !=
nullptr;
975 collection =
static_cast<Collection *
>(collection->id.next))
1011 master_collection->
runtime = MEM_new<blender::bke::CollectionRuntime>(__func__);
1013 return master_collection;
1025 Collection *dup_collection =
object->instance_collection;
1033 if (dup_collection == collection) {
1067 if (
ELEM(
nullptr, collection, ob)) {
1076 if (
ELEM(
nullptr, collection, ob)) {
1086 if (
ELEM(
nullptr, collection, ob)) {
1155 while (collection) {
1177 const bool do_extensive_check);
1188 if (
UNLIKELY(cob->ob ==
nullptr)) {
1200 collection->
runtime->gobject_hash = gobject_hash;
1205 if (collection->
runtime->gobject_hash) {
1206#ifdef USE_DEBUG_EXTRA_GOBJECT_ASSERT
1223 bool changed =
false;
1226#ifdef USE_DEBUG_EXTRA_GOBJECT_ASSERT
1232 GHash *gobject_hash = collection->
runtime->gobject_hash;
1241 if (cob->ob ==
nullptr) {
1281 if (ob_old == cob->
ob) {
1288 if (cob_old != cob) {
1324 const bool do_extensive_check)
1327 if (!do_extensive_check) {
1331 if (collection->
runtime->gobject_hash ==
nullptr) {
1336 GHash *gobject_hash = collection->
runtime->gobject_hash;
1356 bool &r_is_in_viewlayer)
1360 view_layer, collection) :
1362 r_is_in_viewlayer = layer_collection !=
nullptr;
1371 if (!layer_collection) {
1383 bool is_in_viewlayer =
false;
1387 if (view_layer && !is_in_viewlayer) {
1399 view_layer, collection_parent->collection);
1400 if (editable_collection) {
1401 return editable_collection;
1412 const int id_create_flag,
1432 if (light_linking) {
1457 const int id_create_flag,
1478 if (cob ==
nullptr) {
1544 if (ob ==
nullptr) {
1551 if (collection ==
nullptr) {
1577 if (collection ==
nullptr) {
1583 if (collection ==
nullptr) {
1592 bool is_instantiated =
false;
1599 is_instantiated =
true;
1604 if (!is_instantiated) {
1618 if (
ELEM(
nullptr, collection, ob)) {
1643 if (cob ==
nullptr) {
1672 bool removed =
false;
1677 if (collection_skip ==
nullptr) {
1685 if (collection == collection_skip) {
1717 if (child->collection ==
nullptr) {
1726 if ((parent->collection ==
nullptr) ||
1738 if (child_collection ==
nullptr) {
1739 if (parent_collection !=
nullptr) {
1778 if (collection_src !=
nullptr) {
1830 if (collection_object->ob !=
nullptr &&
1832 ELEM(collection_object->ob->instance_collection, instance_collection, collection))
1839 if (collection_child->collection !=
nullptr &&
1851 if (collection == new_ancestor) {
1855 if (collection ==
nullptr) {
1856 collection = new_ancestor;
1873 bool cycles_found =
false;
1876 if (collection_object->ob !=
nullptr &&
1877 collection_object->ob->instance_collection == collection)
1880 collection_object->ob->instance_collection =
nullptr;
1881 cycles_found =
true;
1887 cycles_found =
true;
1891 return cycles_found;
1898 bool cycles_found =
false;
1903 cycles_found =
true;
1906 cycles_found =
true;
1910 return cycles_found;
1928 if (child->collection == collection) {
1955 const int id_create_flag,
1968 if (light_linking) {
1992 const int id_create_flag)
1995 if (child ==
nullptr) {
2040 if (other_child != child) {
2060 BLI_addtail(&child->collection->runtime->parents, cparent);
2098 if (scene->master_collection !=
nullptr) {
2139 *r_key = child->collection;
2151 *r_key = parent->collection;
2170 if (child->collection->id.session_uid == session_uid) {
2171 return child->collection;
2174 if (nested !=
nullptr) {
2209 bool changed =
false;
2252 if (layer_collection !=
nullptr) {
2269 bool relative_after,
2291 if (relative_child) {
2294 if (relative_after) {
2329 callback(collection,
data);
2338 int *tot =
static_cast<int *
>(
data);
2345 **
array = collection;
2351 int *r_collections_array_len)
2353 *r_collections_array =
nullptr;
2354 *r_collections_array_len = 0;
2356 if (scene ==
nullptr) {
2368 *r_collections_array =
array;
2374 Scene *scene =
static_cast<Scene *
>(data_in);
2377 data->scene = scene;
2397 iter->
valid =
false;
2411 iter->
valid =
false;
2430 if (visited_objects !=
nullptr) {
2431 data->visited = visited_objects;
2448 Scene *scene =
static_cast<Scene *
>(data_in);
2464 if (ob && (ob->
flag &
data->flag) == 0) {
2481 iter->
data = data_in;
2519 for (; cob !=
nullptr; cob = cob->
next) {
2545 collection =
static_cast<Collection *
>(
data->scene_collection_iter.current);
2555 }
while (
data->scene_collection_iter.valid);
2557 if (!
data->scene_collection_iter.valid) {
2558 iter->
valid =
false;
2568 if (
data->visited !=
nullptr) {
2579 while (iter.
valid) {
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
CollectionChild * BKE_collection_child_find(Collection *parent, Collection *collection)
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)
bool BKE_collection_cycle_find(Collection *new_ancestor, Collection *collection)
#define BKE_SCENE_COLLECTION_NAME
@ COLLECTION_TAG_COLLECTION_OBJECT_DIRTY
@ COLLECTION_TAG_RELATION_REBUILD
IDProperty * IDP_GetPropertyFromGroup(const IDProperty *prop, blender::StringRef name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_AssignString(IDProperty *prop, const char *st) ATTR_NONNULL()
#define IDP_BlendDataRead(reader, prop)
void IDP_FreeProperty(IDProperty *prop)
IDProperty * IDP_New(char type, const IDPropertyTemplate *val, blender::StringRef name, eIDPropertyFlag flags={}) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
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)
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()
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)
@ LIB_ID_CREATE_NO_USER_REFCOUNT
@ LIB_ID_CREATE_NO_DEG_TAG
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_)
LibraryForeachIDCallbackFlag
@ IDWALK_CB_EMBEDDED_NOT_OWNING
@ IDWALK_CB_OVERRIDE_LIBRARY_HIERARCHY_DEFAULT
@ IDWALK_CB_READFILE_IGNORE
#define BKE_LIB_FOREACHID_PROCESS_ID(data_, id_, cb_flag_)
LibraryForeachIDFlag BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data)
@ IDWALK_NO_ORIG_POINTERS_ACCESS
void BKE_libblock_relink_to_newid(Main *bmain, ID *id, int remap_flag) ATTR_NONNULL()
@ ID_REMAP_SKIP_USER_CLEAR
@ ID_REMAP_FORCE_OBDATA_IN_EDITMODE
#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)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
bool BLI_listbase_move_index(ListBase *listbase, int from, int to) ATTR_NONNULL()
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkafter(ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void BLI_remlink(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)
ListBase BLI_listbase_from_link(Link *some_link)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool BLI_listbase_validate(ListBase *lb)
void BLI_insertlinkbefore(ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
MINLINE int integer_digits_i(int i)
char * STRNCPY(char(&dst)[N], const char *src)
size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
size_t size_t size_t BLI_snprintf_utf8(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
char size_t BLI_strncpy_utf8_rlen(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
#define STRNCPY_UTF8(dst, src)
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 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,...)
T * DEG_get_original(T *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.
#define COLLECTION_FLAG_ALL_RUNTIME
@ COLLECTION_HAS_OBJECT_CACHE_INSTANCED
@ COLLECTION_HAS_OBJECT_CACHE
@ COLLECTION_HIDE_VIEWPORT
#define DNA_struct_default_get(struct_name)
@ LAYER_COLLECTION_EXCLUDE
Object is a sort of wrapper for general info.
#define OB_TYPE_IS_GEOMETRY(_type)
Types and defines for representing Rigid Body entities.
#define BASE_SELECTED(v3d, base)
#define BASE_SELECTABLE(v3d, base)
Read Guarded memory(de)allocation.
BMesh const char void * data
unsigned long long int uint64_t
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 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_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_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 Collection * collection_from_session_uid_recursive(Collection *collection, uint64_t session_uid)
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)
Collection * BKE_collection_duplicate(Main *bmain, Collection *parent, CollectionChild *child_old, Collection *collection, eDupli_ID_Flags duplicate_flags, uint duplicate_options)
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)
Collection * BKE_collection_from_session_uid(Scene *scene, uint64_t session_uid)
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_collection_exporter_move(Collection *collection, const int from, const int to)
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)
CollectionExport * BKE_collection_exporter_add(Collection *collection, char *idname, char *label)
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_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)
bool BKE_collection_contains_geometry_recursive(const Collection *collection)
void BKE_main_collections_object_cache_free(const Main *bmain)
Collection * BKE_collection_object_find(Main *bmain, Scene *scene, Collection *collection, Object *ob)
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)
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)
void BKE_collection_new_name_get(Collection *collection_parent, char r_name[MAX_ID_NAME - 2])
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 bool collection_is_editable_in_viewlayer(const ViewLayer *view_layer, Collection *collection, bool &r_is_in_viewlayer)
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)
DEG_id_tag_update_ex(cb_data->bmain, cb_data->owner_id, ID_RECALC_TAG_FOR_UNDO|ID_RECALC_SYNC_TO_EVAL)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
struct Collection * collection
CollectionLightLinking light_linking
IDProperty * export_properties
struct CollectionObject * next
CollectionLightLinking light_linking
struct Collection * collection
struct PreviewImage * preview
int active_exporter_index
CollectionRuntimeHandle * runtime
struct Collection * instance_collection
LightLinking * light_linking
BLI_Iterator scene_collection_iter
CollectionObject * cob_next
struct Collection * master_collection