|
Blender
V2.93
|
#include "BLI_compiler_compat.h"#include "BLI_ghash.h"#include "BLI_iterator.h"#include "BLI_sys_types.h"#include "DNA_listBase.h"Go to the source code of this file.
Classes | |
| struct | CollectionParent |
Macros | |
| #define | FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN(_collection, _object, _mode) |
| #define | FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END |
| #define | FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object) |
| #define | FOREACH_COLLECTION_OBJECT_RECURSIVE_END |
| #define | FOREACH_SCENE_COLLECTION_BEGIN(scene, _instance) |
| #define | FOREACH_SCENE_COLLECTION_END ITER_END |
| #define | FOREACH_COLLECTION_BEGIN(_bmain, _scene, Type, _instance) |
| #define | FOREACH_COLLECTION_END |
| #define | FOREACH_SCENE_OBJECT_BEGIN(scene, _instance) |
| #define | FOREACH_SCENE_OBJECT_END ITER_END |
Typedefs | |
| typedef struct CollectionParent | CollectionParent |
| typedef void(* | BKE_scene_objects_Cb) (struct Object *ob, void *data) |
| typedef void(* | BKE_scene_collections_Cb) (struct Collection *ob, void *data) |
| #define FOREACH_COLLECTION_BEGIN | ( | _bmain, | |
| _scene, | |||
| Type, | |||
| _instance | |||
| ) |
Definition at line 244 of file BKE_collection.h.
| #define FOREACH_COLLECTION_END |
Definition at line 266 of file BKE_collection.h.
| #define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN | ( | _collection, | |
| _object | |||
| ) |
Definition at line 212 of file BKE_collection.h.
| #define FOREACH_COLLECTION_OBJECT_RECURSIVE_END |
Definition at line 218 of file BKE_collection.h.
| #define FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN | ( | _collection, | |
| _object, | |||
| _mode | |||
| ) |
Definition at line 195 of file BKE_collection.h.
| #define FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END |
Definition at line 206 of file BKE_collection.h.
| #define FOREACH_SCENE_COLLECTION_BEGIN | ( | scene, | |
| _instance | |||
| ) |
Definition at line 234 of file BKE_collection.h.
| #define FOREACH_SCENE_COLLECTION_END ITER_END |
Definition at line 242 of file BKE_collection.h.
| #define FOREACH_SCENE_OBJECT_BEGIN | ( | scene, | |
| _instance | |||
| ) |
Definition at line 271 of file BKE_collection.h.
| #define FOREACH_SCENE_OBJECT_END ITER_END |
Definition at line 279 of file BKE_collection.h.
| typedef void(* BKE_scene_collections_Cb) (struct Collection *ob, void *data) |
Definition at line 191 of file BKE_collection.h.
Definition at line 190 of file BKE_collection.h.
| typedef struct CollectionParent CollectionParent |
| struct Collection* BKE_collection_add | ( | Main * | bmain, |
| Collection * | collection_parent, | ||
| const char * | name_custom | ||
| ) |
Add a collection to a collection ListBase and synchronize all render layers The ListBase is NULL when the collection is to be added to the master collection
Definition at line 435 of file collection.c.
References BKE_main_collection_sync(), and collection_add().
Referenced by add_loose_objects_to_scene(), BKE_lib_override_library_main_resync(), collection_add_exec(), collection_create_exec(), collection_new_exec(), do_version_layers_to_collections(), do_versions_after_linking_280(), ED_rigidbody_constraint_add(), lib_override_library_create_post_process(), and move_to_collection_exec().
| void BKE_collection_add_from_collection | ( | Main * | bmain, |
| Scene * | scene, | ||
| Collection * | collection_src, | ||
| Collection * | collection_dst | ||
| ) |
Add collection_dst to all scene collections that reference collection collection_src is in.
Logic is very similar to BKE_collection_object_add_from().
Definition at line 476 of file collection.c.
References BKE_main_collection_sync(), collection_child_add(), collection_find_child(), FOREACH_SCENE_COLLECTION_BEGIN, FOREACH_SCENE_COLLECTION_END, ID_IS_LINKED, Scene::master_collection, and scene.
Referenced by lib_override_library_create_post_process().
| void BKE_collection_add_from_object | ( | struct Main * | bmain, |
| struct Scene * | scene, | ||
| const struct Object * | ob_src, | ||
| struct Collection * | collection_dst | ||
| ) |
Referenced by lib_override_library_create_post_process().
| void BKE_collection_blend_read_data | ( | struct BlendDataReader * | reader, |
| struct Collection * | collection | ||
| ) |
Definition at line 244 of file collection.c.
References BKE_collection_compat_blend_read_data(), BKE_previewimg_blend_read(), BKE_view_layer_blend_read_data(), BLI_listbase_clear(), BLO_read_data_address, BLO_read_list(), Collection::children, COLLECTION_HAS_OBJECT_CACHE, COLLECTION_HAS_OBJECT_CACHE_INSTANCED, Collection::flag, Collection::gobject, NULL, Collection::object_cache, Collection::object_cache_instanced, Collection::parents, Collection::preview, and Collection::tag.
Referenced by collection_blend_read_data(), and direct_link_id_embedded_id().
| void BKE_collection_blend_read_expand | ( | struct BlendExpander * | expander, |
| struct Collection * | collection | ||
| ) |
Definition at line 345 of file collection.c.
References BKE_collection_compat_blend_read_expand(), BLO_expand, Collection::children, Collection::gobject, LISTBASE_FOREACH, and NULL.
Referenced by collection_blend_read_expand(), and expand_id_embedded_id().
| void BKE_collection_blend_read_lib | ( | struct BlendLibReader * | reader, |
| struct Collection * | collection | ||
| ) |
Definition at line 310 of file collection.c.
References BKE_collection_compat_blend_read_lib(), BKE_view_layer_blend_read_lib(), Collection::id, ID::lib, and lib_link_collection_data().
Referenced by collection_blend_read_lib(), and lib_link_id_embedded_id().
| void BKE_collection_blend_write_nolib | ( | struct BlendWriter * | writer, |
| struct Collection * | collection | ||
| ) |
Definition at line 197 of file collection.c.
References BKE_id_blend_write(), BKE_previewimg_blend_write(), BLO_write_struct, Collection::children, Collection::gobject, Collection::id, LISTBASE_FOREACH, and Collection::preview.
Referenced by collection_blend_write(), and scene_blend_write().
| bool BKE_collection_child_add | ( | struct Main * | bmain, |
| struct Collection * | parent, | ||
| struct Collection * | child | ||
| ) |
Definition at line 1606 of file collection.c.
References BKE_main_collection_sync(), and collection_child_add().
Referenced by add_collections_to_scene(), and collection_link_exec().
| bool BKE_collection_child_add_no_sync | ( | struct Collection * | parent, |
| struct Collection * | child | ||
| ) |
Definition at line 1616 of file collection.c.
References collection_child_add().
Referenced by single_object_users_collection().
| bool BKE_collection_child_remove | ( | struct Main * | bmain, |
| struct Collection * | parent, | ||
| struct Collection * | child | ||
| ) |
Definition at line 1621 of file collection.c.
References BKE_main_collection_sync(), and collection_child_remove().
Referenced by collection_cycle_fix_recursive(), and unlink_collection_fn().
| void BKE_collection_compat_blend_read_data | ( | struct BlendDataReader * | reader, |
| struct SceneCollection * | sc | ||
| ) |
Referenced by BKE_collection_blend_read_data(), and scene_blend_read_data().
| void BKE_collection_compat_blend_read_expand | ( | struct BlendExpander * | expander, |
| struct SceneCollection * | sc | ||
| ) |
Referenced by BKE_collection_blend_read_expand(), and scene_blend_read_expand().
| void BKE_collection_compat_blend_read_lib | ( | struct BlendLibReader * | reader, |
| struct Library * | lib, | ||
| struct SceneCollection * | sc | ||
| ) |
Referenced by BKE_collection_blend_read_lib(), and scene_blend_read_lib().
| bool BKE_collection_cycle_find | ( | Collection * | new_ancestor, |
| Collection * | collection | ||
| ) |
Find potential cycles in collections.
| new_ancestor | the potential new owner of given collection, or the collection to check if the later is NULL. |
| collection | the collection we want to add to new_ancestor, may be NULL if we just want to ensure new_ancestor does not already have cycles. |
Definition at line 1450 of file collection.c.
References BKE_collection_cycle_find(), collection_instance_find_recursive(), LISTBASE_FOREACH, NULL, and Collection::parents.
Referenced by BKE_collection_cycle_find(), BKE_collection_move(), BKE_collection_parent_relations_rebuild(), collection_child_add(), collection_cycle_fix_recursive(), collection_instance_add_exec(), and collection_instance_exec().
| bool BKE_collection_cycles_fix | ( | Main * | bmain, |
| Collection * | collection | ||
| ) |
Find and fix potential cycles in collections.
| collection | The collection to check for existing cycles. |
Definition at line 1519 of file collection.c.
References collection_cycle_fix_recursive(), and collection_instance_fix_recursive().
Referenced by do_versions_after_linking_290().
| bool BKE_collection_delete | ( | Main * | bmain, |
| Collection * | collection, | ||
| bool | hierarchy | ||
| ) |
Remove a collection, optionally removing its child objects or moving them to parent collections.
Definition at line 520 of file collection.c.
References BKE_collection_delete(), BKE_id_delete(), BKE_main_collection_sync(), BLI_assert, Collection::children, CollectionChild::collection, collection_child_add(), COLLECTION_IS_MASTER, collection_object_add(), collection_object_remove(), ListBase::first, Collection::flag, Collection::gobject, LISTBASE_FOREACH, NULL, CollectionObject::ob, and Collection::parents.
Referenced by BKE_collection_delete(), BKE_lib_override_library_main_resync(), and outliner_collection_delete().
| struct Collection* BKE_collection_duplicate | ( | struct Main * | bmain, |
| struct Collection * | parent, | ||
| struct Collection * | collection, | ||
| const uint | duplicate_flags, | ||
| const uint | duplicate_options | ||
| ) |
Referenced by BKE_scene_duplicate(), and collection_duplicate_exec().
| void BKE_collection_free | ( | Collection * | collection | ) |
Free (or release) any data used by this collection (does not free the collection itself).
Definition at line 510 of file collection.c.
References BKE_libblock_free_data(), collection_free_data(), and Collection::id.
Referenced by scene_free_data().
| struct Collection* BKE_collection_from_index | ( | Scene * | scene, |
| const int | index | ||
| ) |
Return Scene Collection for a given index.
The index is calculated from top to bottom counting the children before the siblings.
Definition at line 1734 of file collection.c.
References collection_from_index_recursive(), Scene::master_collection, and scene.
Referenced by move_to_collection_exec(), and move_to_collection_invoke().
| bool BKE_collection_has_collection | ( | struct Collection * | parent, |
| struct Collection * | collection | ||
| ) |
Definition at line 1545 of file collection.c.
References collection_find_child_recursive().
Referenced by outliner_collection_is_isolated().
| bool BKE_collection_has_object | ( | struct Collection * | collection, |
| const struct Object * | ob | ||
| ) |
Referenced by collection_link_exec(), collection_objects_remove_exec(), lib_override_library_create_post_process(), lineart_usage_check(), make_override_library_object_overridable_check(), object_add_duplicate_internal(), object_in_any_collection(), object_select_same_collection_exec(), objects_add_active_exec(), objects_remove_active_exec(), and select_grouped_collection().
| bool BKE_collection_has_object_recursive | ( | struct Collection * | collection, |
| struct Object * | ob | ||
| ) |
Definition at line 961 of file collection.c.
References BKE_collection_object_cache_get(), BLI_findptr(), ELEM, and NULL.
Referenced by animdata_filter_base_is_ok(), animdata_filter_gpencil(), BKE_object_scenes_users_get(), EEVEE_lightprobes_obj_visibility_cb(), EEVEE_render_cache(), make_override_collections_of_linked_object_itemf(), psys_check_group_weights(), select_grouped_exec(), and template_id_cb().
| bool BKE_collection_has_object_recursive_instanced | ( | struct Collection * | collection, |
| struct Object * | ob | ||
| ) |
Definition at line 971 of file collection.c.
References BKE_collection_object_cache_instanced_get(), BLI_findptr(), ELEM, and NULL.
Referenced by _lineart_object_not_in_source_collection(), and lineart_gpencil_generate().
| bool BKE_collection_is_empty | ( | const struct Collection * | collection | ) |
Referenced by BKE_lib_override_library_main_resync(), BMD_error_messages(), and collection_drop_invoke().
| bool BKE_collection_is_in_scene | ( | struct Collection * | collection | ) |
Definition at line 1391 of file collection.c.
References BKE_collection_is_in_scene(), COLLECTION_IS_MASTER, Collection::flag, LISTBASE_FOREACH, and Collection::parents.
Referenced by BKE_collection_is_in_scene(), BKE_collection_object_add(), BKE_collection_object_remove(), and lib_override_library_create_post_process().
| struct Collection* BKE_collection_master_add | ( | void | ) |
Definition at line 892 of file collection.c.
References BKE_libblock_alloc(), COLLECTION_COLOR_NONE, COLLECTION_IS_MASTER, Collection::color_tag, Collection::flag, ID::flag, Collection::id, ID_GR, LIB_EMBEDDED_DATA, LIB_ID_CREATE_NO_MAIN, and NULL.
Referenced by do_version_layers_to_collections(), and scene_init_data().
| bool BKE_collection_move | ( | struct Main * | bmain, |
| struct Collection * | to_parent, | ||
| struct Collection * | from_parent, | ||
| struct Collection * | relative, | ||
| bool | relative_after, | ||
| struct Collection * | collection | ||
| ) |
Definition at line 1918 of file collection.c.
References BKE_collection_cycle_find(), BKE_collection_object_cache_free(), BKE_main_collection_sync(), BKE_scene_find_from_collection(), BLI_insertlinkafter(), BLI_insertlinkbefore(), BLI_remlink(), Collection::children, LayerCollectionFlag::collection, collection_child_add(), collection_child_remove(), collection_find_child(), COLLECTION_IS_MASTER, Collection::flag, layer_collection_flags_restore(), and layer_collection_flags_store().
Referenced by collection_drop_invoke().
| void BKE_collection_new_name_get | ( | Collection * | collection_parent, |
| char * | rname | ||
| ) |
The automatic/fallback name of a new collection.
Definition at line 751 of file collection.c.
References BLI_listbase_count(), BLI_sprintfN(), BLI_strdup(), BLI_strncpy(), Collection::children, COLLECTION_IS_MASTER, Collection::flag, Collection::id, integer_digits_i(), MAX_NAME, MEM_freeN, and ID::name.
Referenced by collection_add(), and move_to_collection_invoke().
| bool BKE_collection_object_add | ( | Main * | bmain, |
| Collection * | collection, | ||
| Object * | ob | ||
| ) |
Add object to collection
Definition at line 1134 of file collection.c.
References BKE_collection_is_in_scene(), BKE_main_collection_sync(), BLI_assert, collection_object_add(), collection_parent_editable_find_recursive(), DEG_id_tag_update(), ELEM, Collection::id, ID_RECALC_GEOMETRY, and NULL.
Referenced by add_collections_to_scene(), add_loose_object_data_to_scene(), add_loose_objects_to_scene(), bc_add_object(), BKE_collection_object_move(), BKE_object_add(), BKE_object_add_for_data(), collection_add_exec(), collection_create_exec(), collection_drop_invoke(), collection_link_exec(), do_version_layers_to_collections(), do_versions_after_linking_280(), ED_rigidbody_constraint_add(), gpencil_layer_to_curve(), import_endjob(), lib_override_library_create_post_process(), make_links_data_exec(), make_links_scene_exec(), make_local_all__instance_indirect_unused(), move_to_collection_exec(), Freestyle::BlenderStrokeRenderer::NewMesh(), object_add_duplicate_internal(), object_preview_scene_create(), objects_add_active_exec(), and scene_drop_invoke().
| void BKE_collection_object_add_from | ( | Main * | bmain, |
| Scene * | scene, | ||
| Object * | ob_src, | ||
| Object * | ob_dst | ||
| ) |
Add ob_dst to all scene collections that reference object ob_src is in. Used for copying objects.
Logic is very similar to BKE_collection_add_from_object()
Definition at line 1168 of file collection.c.
References BKE_collection_has_object(), BKE_main_collection_sync(), collection_object_add(), FOREACH_SCENE_COLLECTION_BEGIN, FOREACH_SCENE_COLLECTION_END, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, Scene::master_collection, and scene.
Referenced by BKE_object_add_from(), DocumentImporter::create_instance_node(), duplibase_for_convert(), lib_override_library_create_post_process(), make_object_duplilist_real(), object_add_duplicate_internal(), and template_id_cb().
| void BKE_collection_object_cache_free | ( | struct Collection * | collection | ) |
Definition at line 872 of file collection.c.
References collection_object_cache_free().
Referenced by BKE_collection_move(), BKE_main_collection_sync_remap(), collection_child_add(), collection_child_remove(), collection_free_data(), collection_object_add(), collection_object_remove(), and collection_object_remove_nulls().
| struct ListBase BKE_collection_object_cache_get | ( | struct Collection * | collection | ) |
Definition at line 827 of file collection.c.
References BLI_MUTEX_INITIALIZER, BLI_mutex_lock(), BLI_mutex_unlock(), COLLECTION_HAS_OBJECT_CACHE, collection_object_cache_fill(), Collection::flag, and Collection::object_cache.
Referenced by BKE_collection_has_object_recursive(), BKE_collection_or_layer_objects(), make_duplis_particle_system(), make_proxy_exec(), and psys_find_group_weights().
| ListBase BKE_collection_object_cache_instanced_get | ( | struct Collection * | collection | ) |
Definition at line 843 of file collection.c.
References BLI_MUTEX_INITIALIZER, BLI_mutex_lock(), BLI_mutex_unlock(), COLLECTION_HAS_OBJECT_CACHE_INSTANCED, collection_object_cache_fill(), Collection::flag, and Collection::object_cache_instanced.
Referenced by BKE_collection_has_object_recursive_instanced().
| bool BKE_collection_object_cyclic_check | ( | struct Main * | bmain, |
| struct Object * | object, | ||
| struct Collection * | collection | ||
| ) |
Definition at line 938 of file collection.c.
References BKE_main_id_tag_listbase(), collection_object_cyclic_check_internal(), Main::collections, and LIB_TAG_DOIT.
Referenced by collection_link_exec(), and objects_add_active_exec().
| struct Collection* BKE_collection_object_find | ( | struct Main * | bmain, |
| struct Scene * | scene, | ||
| struct Collection * | collection, | ||
| struct Object * | ob | ||
| ) |
Definition at line 990 of file collection.c.
References BKE_collection_has_object(), collection_next_find(), Main::collections, ListBase::first, Scene::master_collection, NULL, and scene.
Referenced by BKE_object_groups(), BKE_object_groups_clear(), collection_object_active_find_index(), and collection_object_active_itemf().
| void BKE_collection_object_move | ( | Main * | bmain, |
| Scene * | scene, | ||
| Collection * | collection_dst, | ||
| Collection * | collection_src, | ||
| Object * | ob | ||
| ) |
Move object from a collection into another
If source collection is NULL move it from all the existing collections.
Definition at line 1367 of file collection.c.
References BKE_collection_object_add(), BKE_collection_object_remove(), NULL, scene, and scene_collections_object_remove().
Referenced by collection_drop_invoke(), and move_to_collection_exec().
| bool BKE_collection_object_remove | ( | Main * | bmain, |
| Collection * | collection, | ||
| Object * | ob, | ||
| const bool | free_us | ||
| ) |
Remove object from collection.
Definition at line 1193 of file collection.c.
References BKE_collection_is_in_scene(), BKE_main_collection_sync(), collection_object_remove(), DEG_id_tag_update(), ELEM, Collection::id, ID_RECALC_GEOMETRY, and NULL.
Referenced by BKE_collection_object_move(), BKE_object_groups_clear(), collection_objects_remove_exec(), collection_remove_exec(), do_versions_after_linking_280(), objects_remove_active_exec(), and unlink_object_fn().
| bool BKE_collection_objects_select | ( | ViewLayer * | view_layer, |
| Collection * | collection, | ||
| bool | deselect | ||
| ) |
Select all the objects in this Collection (and its nested collections) for this ViewLayer. Return true if any object was selected.
Definition at line 1781 of file collection.c.
References BKE_layer_collection_first_from_scene_collection(), BKE_layer_collection_objects_select(), collection_objects_select(), and NULL.
| struct Base* BKE_collection_or_layer_objects | ( | const struct ViewLayer * | view_layer, |
| struct Collection * | collection | ||
| ) |
Referenced by BKE_collision_relations_create(), and BKE_effector_relations_create().
| void BKE_collection_parent_relations_rebuild | ( | Collection * | collection | ) |
Rebuild parent relationships from child ones, for all children of given collection.
Definition at line 1636 of file collection.c.
References BKE_collection_cycle_find(), BLI_addtail(), BLI_freelinkN(), Collection::children, CollectionParent::collection, collection_find_child(), LISTBASE_FOREACH_MUTABLE, MEM_callocN, and NULL.
Referenced by collection_parents_rebuild_recursive().
| const char* BKE_collection_ui_name_get | ( | struct Collection * | collection | ) |
The name to show in the interface.
Definition at line 776 of file collection.c.
References COLLECTION_IS_MASTER, Collection::flag, Collection::id, IFACE_, and ID::name.
Referenced by draw_selected_name(), get_stats_string(), move_to_collection_menu_create(), and outliner_add_collection_init().
| void BKE_collections_after_lib_link | ( | struct Main * | bmain | ) |
Definition at line 1406 of file collection.c.
References BKE_main_collection_sync().
Referenced by blo_read_file_internal(), and library_link_end().
| void BKE_collections_child_remove_nulls | ( | Main * | bmain, |
| Collection * | parent_collection, | ||
| Collection * | child_collection | ||
| ) |
Remove all NULL children from parent collections of changed collection. This is used for library remapping, where these pointers have been set to NULL. Otherwise this should never happen.
| parent_collection | The collection owning the pointers that were remapped. May be NULL, in which case whole bmain database of collections is checked. |
| child_collection | The collection that was remapped to another pointer. May be NULL, in which case whole bmain database of collections is checked. |
Definition at line 1318 of file collection.c.
References BLI_freelinkN(), collection_find_child(), collection_missing_parents_remove(), collection_null_children_remove(), Main::collections, ListBase::first, Collection::id, Scene::id, Scene::master_collection, ID::next, NULL, Collection::parents, scene, and Main::scenes.
Referenced by libblock_remap_data_postprocess_collection_update().
| void BKE_collections_object_remove_nulls | ( | struct Main * | bmain | ) |
Definition at line 1271 of file collection.c.
References collection_object_remove_nulls(), Main::collections, ListBase::first, Scene::id, Scene::master_collection, ID::next, scene, and Main::scenes.
Referenced by libblock_remap_data_postprocess_object_update().
| void BKE_main_collections_parent_relations_rebuild | ( | Main * | bmain | ) |
Rebuild parent relationships from child ones, for all collections in given bmain.
Definition at line 1671 of file collection.c.
References BLI_freelistN(), collection_parents_rebuild_recursive(), COLLECTION_TAG_RELATION_REBUILD, Main::collections, ListBase::first, Scene::id, Scene::master_collection, ID::next, NULL, scene, and Main::scenes.
Referenced by after_liblink_merged_bmain_process(), and libblock_remap_data_postprocess_collection_update().
| void BKE_scene_collections_iterator_begin | ( | BLI_Iterator * | iter, |
| void * | data_in | ||
| ) |
Only use this in non-performance critical situations (it iterates over all scene collections twice)
Definition at line 2048 of file collection.c.
References BLI_assert, BLI_ITERATOR_INIT, BLI_Iterator::current, BLI_Iterator::data, data, MEM_callocN, scene, and scene_collections_array().
Referenced by scene_objects_iterator_begin().
| void BKE_scene_collections_iterator_end | ( | struct BLI_Iterator * | iter | ) |
Definition at line 2077 of file collection.c.
References BLI_Iterator::data, data, MEM_freeN, and BLI_Iterator::valid.
Referenced by BKE_scene_objects_iterator_end().
| void BKE_scene_collections_iterator_next | ( | struct BLI_Iterator * | iter | ) |
Definition at line 2065 of file collection.c.
References BLI_Iterator::current, BLI_Iterator::data, data, and BLI_Iterator::valid.
Referenced by BKE_scene_objects_iterator_next().
| bool BKE_scene_collections_object_remove | ( | Main * | bmain, |
| Scene * | scene, | ||
| Object * | ob, | ||
| const bool | free_us | ||
| ) |
Remove object from all collections of scene
Definition at line 1243 of file collection.c.
References NULL, scene, and scene_collections_object_remove().
Referenced by ED_object_base_free_and_unlink(), ED_object_base_free_and_unlink_no_indirect_check(), DocumentImporter::finish(), and outline_batch_delete_hierarchy().
Generate a new GSet (or extend given objects_gset if not NULL) with all objects referenced by all collections of given scene.
Definition at line 2196 of file collection.c.
References BKE_scene_objects_iterator_end(), BKE_scene_objects_iterator_next(), BLI_Iterator::data, NULL, scene, scene_objects_iterator_begin(), and BLI_Iterator::valid.
Referenced by lib_override_library_create_post_process().
| void BKE_scene_objects_iterator_begin | ( | struct BLI_Iterator * | iter, |
| void * | data_in | ||
| ) |
Definition at line 2122 of file collection.c.
References NULL, scene, and scene_objects_iterator_begin().
| void BKE_scene_objects_iterator_end | ( | struct BLI_Iterator * | iter | ) |
Definition at line 2177 of file collection.c.
References BKE_scene_collections_iterator_end(), BLI_gset_free(), BLI_Iterator::data, data, MEM_freeN, and NULL.
Referenced by BKE_scene_objects_as_gset(), and single_obdata_users().
| void BKE_scene_objects_iterator_next | ( | struct BLI_Iterator * | iter | ) |
Definition at line 2145 of file collection.c.
References BKE_scene_collections_iterator_next(), BLI_Iterator::current, BLI_Iterator::data, data, ListBase::first, Collection::gobject, CollectionObject::next, NULL, CollectionObject::ob, object_base_unique(), and BLI_Iterator::valid.
Referenced by BKE_scene_objects_as_gset(), and scene_objects_iterator_begin().