10#define DNA_DEPRECATED_ALLOW
147 if (
STREQ(view_layer->name, layer_name)) {
180 for (; sub_collection !=
nullptr; sub_collection = sub_collection->
next) {
193 if (view_layer_source) {
208 *view_layer_new = *view_layer_source;
236 sizeof(view_layer_new->
name));
238 return view_layer_new;
257 if (view_layer->
stats) {
259 view_layer->
stats =
nullptr;
278 view_layer->
basact =
nullptr;
298 base->object->flag |= tag;
301 base->object->flag &= ~tag;
349 std::scoped_lock
lock(hash_lock);
366 else if (do_base_duplicates_fix) {
367 if (view_layer->
basact == base) {
368 view_layer->
basact =
nullptr;
374 "Object '%s' has more than one entry in view layer's object bases listbase",
375 base->object->id.name + 2);
389 "View layer out of sync, invoke BKE_view_layer_synced_ensure.");
410 view_layer->
basact = selbase;
432 while (aov_dst !=
nullptr) {
438 aov_dst = aov_dst->
next;
439 aov_src = aov_src->
next;
448 if (lightgroups_src !=
nullptr) {
454 lightgroups_src->
first);
456 while (lightgroup_dst !=
nullptr) {
462 lightgroup_dst = lightgroup_dst->
next;
463 lightgroup_src = lightgroup_src->
next;
470 const ListBase *layer_collections_src)
475 layer_collections_dst->
first);
477 layer_collections_src->
first);
479 while (layer_collection_dst !=
nullptr) {
489 layer_collection_dst = layer_collection_dst->
next;
490 layer_collection_src = layer_collection_src->
next;
510 view_layer_dst->
stats =
nullptr;
520 "View Layer Object Base out of sync, invoke BKE_view_layer_synced_ensure.");
524 if (view_layer_src->
basact == base_src) {
525 view_layer_dst->
basact = base_dst;
541 view_layer_dst, view_layer_src, &view_layer_dst->
aovs, &view_layer_src->
aovs);
554 char oldname[
sizeof(view_layer->
name)];
564 sizeof(view_layer->
name));
571 if (node->custom1 == index) {
585 if (win->scene == scene &&
STREQ(win->view_layer_name, oldname)) {
725 if (i_nested != -1) {
833 layer_resync->
layer = layer;
836 if (parent_layer_resync !=
nullptr) {
842 layer_resync->
is_usable && (parent_layer_resync ==
nullptr ||
848 layer_resync->
is_used = parent_layer_resync !=
nullptr ? parent_layer_resync->
is_used :
true;
860 layer_resync, child_layer, mempool);
868 "Old LayerCollection for %s is...\n\tusable: %d\n\tvalid parent: %d\n\tvalid child: "
903 while (queue_head !=
nullptr) {
904 current_layer_resync = queue_head;
905 queue_head = current_layer_resync->
queue_next;
907 if (current_layer_resync->
collection == child_collection &&
925 queue_tail = child_layer_resync;
926 if (queue_head ==
nullptr) {
927 queue_head = queue_tail;
935 sibling_layer_resync,
938 if (sibling_layer_resync == root_layer_resync) {
942 queue_tail->queue_next = sibling_layer_resync;
943 sibling_layer_resync->queue_next =
nullptr;
944 queue_tail = sibling_layer_resync;
945 if (queue_head ==
nullptr) {
946 queue_head = queue_tail;
952 current_layer_resync =
nullptr;
955 return current_layer_resync;
969 "Freeing unused LayerCollection for %s",
971 "<Deleted Collection>");
980 layer_resync->
layer =
nullptr;
1012 scene =
static_cast<const Scene *
>(scene->id.next))
1024 const short collection_restrict,
1025 const short layer_restrict,
1026 const ushort local_collections_bits)
1034 if (cob->ob ==
nullptr) {
1048 base =
static_cast<Base *
>(*base_p);
1049 if (!
ELEM(base, r_lb_new_object_bases->
first, r_lb_new_object_bases->
last)) {
1093 const short parent_layer_flag,
1094 const short parent_collection_restrict,
1095 const short parent_layer_restrict,
1096 const ushort parent_local_collections_bits)
1110 ListBase new_lb_layer = {
nullptr,
nullptr};
1116 Collection *child_collection = child->collection;
1118 if (child_collection ==
nullptr) {
1125 if (child_layer_resync !=
nullptr) {
1130 if (child_layer_resync->
is_used) {
1132 "Found same existing LayerCollection for %s as child of %s",
1133 child_collection->
id.
name,
1138 "Found a valid unused LayerCollection for %s as child of %s, re-using it",
1139 child_collection->
id.
name,
1143 child_layer_resync->
is_used =
true;
1151 child_layer_resync->
layer);
1156 "No available LayerCollection for %s as child of %s, creating a new one",
1157 child_collection->
id.
name,
1161 child_layer->
flag = parent_layer_flag;
1165 child_layer_resync->
collection = child_collection;
1166 child_layer_resync->
layer = child_layer;
1168 child_layer_resync->
is_used =
true;
1179 const ushort child_local_collections_bits = parent_local_collections_bits &
1187 short child_collection_restrict = parent_collection_restrict;
1188 short child_layer_restrict = parent_layer_restrict;
1190 child_collection_restrict |= child_collection->
flag;
1191 child_layer_restrict |= child_layer->
flag;
1197 layer_resync_mempool,
1198 r_lb_new_object_bases,
1200 child_collection_restrict,
1201 child_layer_restrict,
1202 child_local_collections_bits);
1237 layer_resync->
layer,
1238 r_lb_new_object_bases,
1239 parent_collection_restrict,
1240 parent_layer_restrict,
1241 parent_local_collections_bits);
1247 bool is_valid =
true;
1249 if (layer ==
nullptr) {
1256 if (cob->ob ==
nullptr) {
1262 "Object '%s' from collection '%s' has no entry in view layer's object bases cache",
1263 cob->ob->id.name + 2,
1330 "ViewLayer's first level of children layer collections should always have "
1331 "exactly one item");
1336 "ViewLayer's first layer collection should always be the one for the scene's "
1337 "master collection");
1362 layer_resync_mempool);
1369 const short parent_exclude = 0, parent_restrict = 0, parent_layer_restrict = 0;
1371 master_layer_resync,
1372 layer_resync_mempool,
1376 parent_layer_restrict,
1381 master_layer_resync =
nullptr;
1385 if (view_layer->
basact == base) {
1386 view_layer->
basact =
nullptr;
1414 else if (
active ==
nullptr) {
1443 scene =
static_cast<const Scene *
>(scene->id.next))
1463 scene =
static_cast<Scene *
>(scene->id.next))
1468 if (view_layer->object_bases_hash) {
1470 view_layer->object_bases_hash =
nullptr;
1484 collection =
static_cast<Collection *
>(collection->id.next))
1507 bool changed =
false;
1571 if (lc_parent == lc_child) {
1614 if (v3d ==
nullptr) {
1708 lc_parent = lc_iter;
1713 while (lc_parent != lc) {
1718 lc_parent = lc_iter;
1734 const int local_collections_uid)
1743 const int local_collections_uid)
1754 const ushort local_collections_uid,
1763 if (cob->ob ==
nullptr) {
1791 base->local_collections_bits &= ~local_collections_uid;
1812 View3D *v3d =
static_cast<View3D *
>(area->spacedata.first);
1843 lc_parent = lc_iter;
1848 while (lc_parent != lc) {
1853 lc_parent = lc_iter;
1902 const bool hierarchy)
1931 const bool restore_flag)
1991 if (found !=
nullptr) {
2034 return (base->
flag != 0);
2049 if (base ==
nullptr) {
2050 iter->
data =
nullptr;
2051 iter->
valid =
false;
2083 iter->
valid =
false;
2257 if (base ==
nullptr) {
2258 iter->
valid =
false;
2261 iter->
data = data_in;
2265 if (
data->object_type < 0) {
2279 if (base ==
data->base_active) {
2281 base =
static_cast<Base *
>(
data->view_layer->object_bases.first);
2299 iter->
valid =
false;
2354 "view_layer->object_bases_array");
2418 bool &active_collection_found)
2428 active_collection_found =
true;
2438 view_layer->
stats =
nullptr;
2442 bool active_collection_found =
false;
2446 reader, view_layer, &view_layer->
layer_collections,
true, active_collection_found);
2448 if (!active_collection_found) {
2477 if (base->object ==
nullptr) {
2480 if (view_layer->
basact == base) {
2481 view_layer->
basact =
nullptr;
2496 if (aov ==
nullptr) {
2509 if (aov !=
nullptr) {
2558 GHash *name_count =
static_cast<GHash *
>(userdata);
2585 void **value_p =
static_cast<void **
>(
BLI_ghash_lookup(name_count, aov->name));
2626 DATA_(
"Lightgroup"),
2629 sizeof(lightgroup->
name));
2634 if (lightgroup !=
nullptr) {
2659 if (lightgroup->
next) {
2677 if (
BLI_findindex(&view_layer->lightgroups, lightgroup) != -1) {
2694 if (scene !=
nullptr) {
2720 if (lgm ==
nullptr) {
2729 if (lgm ==
nullptr) {
2732 return strlen(lgm->
name);
2737 if (
name[0] !=
'\0') {
2738 if (*lgm ==
nullptr) {
2744 if (*lgm !=
nullptr) {
void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
#define FOREACH_SCENE_OBJECT_END
void BKE_main_collections_object_cache_free(const Main *bmain)
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
void BKE_freestyle_config_copy(struct FreestyleConfig *new_config, const struct FreestyleConfig *config, int flag)
void BKE_freestyle_config_init(struct FreestyleConfig *config)
void BKE_freestyle_config_free(struct FreestyleConfig *config, bool do_id_user)
#define IDP_BlendDataRead(reader, prop)
IDProperty * IDP_CopyProperty_ex(const IDProperty *prop, int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_BlendWrite(BlendWriter *writer, const IDProperty *prop)
void IDP_FreeProperty_ex(IDProperty *prop, bool do_id_user)
bool BKE_base_is_visible(const View3D *v3d, const Base *base)
ListBase * BKE_view_layer_object_bases_get(ViewLayer *view_layer)
@ LIB_ID_CREATE_NO_USER_REFCOUNT
void id_lib_indirect_weak_link(ID *id)
#define CMP_NODE_R_LAYERS
General operations, lookup, etc. for blender objects.
bool BKE_object_is_libdata(const Object *ob)
#define BLI_assert_msg(a, msg)
unsigned int BLI_ghashutil_ptrhash(const void *key)
GHash * BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_str_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghashutil_ptrcmp(const void *a, const void *b)
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
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)
int BLI_listbase_count_at_most(const ListBase *listbase, int count_max) ATTR_WARN_UNUSED_RESULT 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)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void void void void void BLI_duplicatelist(ListBase *dst, const ListBase *src) ATTR_NONNULL(1
void void BLI_INLINE bool BLI_listbase_is_single(const ListBase *lb)
BLI_mempool * BLI_mempool_create(unsigned int esize, unsigned int elem_num, unsigned int pchunk, unsigned int flag) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
void * BLI_mempool_calloc(BLI_mempool *pool) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1)
void BLI_mempool_destroy(BLI_mempool *pool) ATTR_NONNULL(1)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
char * STRNCPY(char(&dst)[N], const char *src)
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_string_replace_char(char *str, char src, char dst) 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 POINTER_FROM_INT(i)
#define UNUSED_VARS_NDEBUG(...)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define POINTER_AS_INT(i)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define BLO_read_struct_list(reader, struct_name, list)
#define BLO_write_struct_list(writer, struct_name, list_ptr)
#define BLO_read_struct(reader, struct_name, ptr_p)
#define CLOG_DEBUG(clg_ref,...)
#define CLOG_FATAL(clg_ref,...)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_debug_print_eval(Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address)
ID and Library types, which are fundamental for SDNA.
#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_HIDE_VIEWPORT
#define DNA_struct_default_get(struct_name)
@ LAYER_COLLECTION_EXCLUDE
@ LAYER_COLLECTION_INDIRECT_ONLY
@ LAYER_COLLECTION_PREVIOUSLY_EXCLUDED
@ LAYER_COLLECTION_HOLDOUT
@ BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT
@ BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT
@ LAYER_COLLECTION_VISIBLE_VIEW_LAYER
@ LAYER_COLLECTION_HIDE_VIEWPORT
@ LAYER_COLLECTION_HAS_OBJECTS
@ VIEW_LAYER_HAS_EXPORT_COLLECTIONS
Object is a sort of wrapper for general info.
#define BASE_SELECTED(v3d, base)
#define BASE_SELECTABLE(v3d, base)
#define BASE_VISIBLE(v3d, base)
Read Guarded memory(de)allocation.
void BKE_view_layer_bases_in_mode_iterator_begin(BLI_Iterator *iter, void *data_in)
void BKE_view_layer_bases_in_mode_iterator_next(BLI_Iterator *iter)
void BKE_view_layer_blend_write(BlendWriter *writer, const Scene *scene, ViewLayer *view_layer)
void BKE_view_layer_rename_lightgroup(Scene *scene, ViewLayer *view_layer, ViewLayerLightgroup *lightgroup, const char *name)
LayerCollection * BKE_layer_collection_first_from_scene_collection(const ViewLayer *view_layer, const Collection *collection)
static void layer_aov_copy_data(ViewLayer *view_layer_dst, const ViewLayer *view_layer_src, ListBase *aovs_dst, const ListBase *aovs_src)
ViewLayerLightgroup * BKE_view_layer_add_lightgroup(ViewLayer *view_layer, const char *name)
bool BKE_view_layer_has_collection(const ViewLayer *view_layer, const Collection *collection)
void BKE_view_layer_blend_read_data(BlendDataReader *reader, ViewLayer *view_layer)
ViewLayer * BKE_view_layer_find_with_aov(Scene *scene, ViewLayerAOV *aov)
LayerCollection * BKE_layer_collection_get_active(ViewLayer *view_layer)
static bool layer_collection_hidden(ViewLayer *view_layer, LayerCollection *lc)
void BKE_view_layer_set_active_lightgroup(ViewLayer *view_layer, ViewLayerLightgroup *lightgroup)
static void layer_collection_free(ViewLayer *view_layer, LayerCollection *lc)
static LayerCollection * collection_from_index(ListBase *lb, const int number, int *i)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
static void layer_collection_flag_set_recursive(LayerCollection *lc, const int flag)
bool BKE_view_layer_has_valid_aov(ViewLayer *view_layer)
static void object_bases_iterator_end(BLI_Iterator *iter)
void BKE_layer_collection_resync_forbid()
void BKE_view_layer_visible_bases_iterator_begin(BLI_Iterator *iter, void *data_in)
static void layer_collection_exclude_all(LayerCollection *layer_collection)
void BKE_view_layer_base_deselect_all(const Scene *scene, ViewLayer *view_layer)
void BKE_scene_view_layers_synced_ensure(const Scene *scene)
void BKE_main_collection_sync_remap(const Main *bmain)
static void object_bases_iterator_begin(BLI_Iterator *iter, void *data_in_v, const int flag)
static void viewlayer_lightgroup_active_set(ViewLayer *view_layer, ViewLayerLightgroup *lightgroup)
void BKE_view_layer_selected_editable_objects_iterator_begin(BLI_Iterator *iter, void *data_in)
static void layer_collection_local_visibility_set_recursive(LayerCollection *layer_collection, const int local_collections_uid)
static int index_from_collection(ListBase *lb, const LayerCollection *lc, int *i)
void BKE_view_layer_set_active_aov(ViewLayer *view_layer, ViewLayerAOV *aov)
static void viewlayer_lightgroup_make_name_unique(ViewLayer *view_layer, ViewLayerLightgroup *lightgroup)
void BKE_view_layer_remove_aov(ViewLayer *view_layer, ViewLayerAOV *aov)
void BKE_view_layer_remove_lightgroup(ViewLayer *view_layer, ViewLayerLightgroup *lightgroup)
void BKE_layer_collection_local_sync(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
static LayerCollectionResync * layer_collection_resync_create_recurse(LayerCollectionResync *parent_layer_resync, LayerCollection *layer, BLI_mempool *mempool)
void BKE_view_layer_selected_editable_objects_iterator_end(BLI_Iterator *iter)
bool BKE_layer_collection_objects_select(const Scene *scene, ViewLayer *view_layer, LayerCollection *lc, bool deselect)
void BKE_view_layer_selected_objects_tag(const Scene *scene, ViewLayer *view_layer, const int tag)
static void viewlayer_aov_active_set(ViewLayer *view_layer, ViewLayerAOV *aov)
void BKE_view_layer_selected_objects_iterator_begin(BLI_Iterator *iter, void *data_in)
static void layer_collection_flag_recursive_set(LayerCollection *lc, const int flag, const bool value, const bool restore_flag)
static bool find_scene_collection_in_scene_collections(ListBase *lb, const LayerCollection *lc)
void BKE_view_layer_visible_bases_iterator_end(BLI_Iterator *iter)
void BKE_view_layer_free_object_content(ViewLayer *view_layer)
static void layer_lightgroup_copy_data(ViewLayer *view_layer_dst, const ViewLayer *view_layer_src, ListBase *lightgroups_dst, const ListBase *lightgroups_src)
void BKE_layer_collection_isolate_local(const Scene *scene, ViewLayer *view_layer, const View3D *v3d, LayerCollection *lc, bool extend)
static void layer_collection_bases_hide_recursive(const Scene *scene, ViewLayer *view_layer, LayerCollection *lc)
void BKE_view_layer_selected_objects_iterator_end(BLI_Iterator *iter)
void BKE_layer_collection_set_flag(LayerCollection *lc, const int flag, const bool value)
void BKE_view_layer_selected_editable_objects_iterator_next(BLI_Iterator *iter)
static void layer_collection_local_sync(const Scene *scene, ViewLayer *view_layer, LayerCollection *layer_collection, const ushort local_collections_uid, bool visible)
bool BKE_layer_collection_has_selected_objects(const Scene *scene, ViewLayer *view_layer, LayerCollection *lc)
static void layer_collection_objects_sync(ViewLayer *view_layer, LayerCollection *layer, ListBase *r_lb_new_object_bases, const short collection_restrict, const short layer_restrict, const ushort local_collections_bits)
void BKE_layer_collection_resync_allow()
static int collection_count(const ListBase *lb)
void BKE_view_layer_free_ex(ViewLayer *view_layer, const bool do_id_user)
void BKE_view_layer_verify_aov(RenderEngine *engine, Scene *scene, ViewLayer *view_layer)
void BKE_layer_eval_view_layer_indexed(Depsgraph *depsgraph, Scene *scene, int view_layer_index)
Object * BKE_view_layer_camera_find(const Scene *scene, ViewLayer *view_layer)
static const short g_base_collection_flags
static std::atomic< int32_t > no_resync
ViewLayer * BKE_view_layer_find_with_lightgroup(Scene *scene, ViewLayerLightgroup *lightgroup)
static LayerCollection * layer_collection_add(ListBase *lb_parent, Collection *collection)
int BKE_lightgroup_membership_length(const LightgroupMembership *lgm)
static bool base_is_in_mode(ObjectsInModeIteratorData *data, Base *base)
ViewLayer * BKE_view_layer_default_view(const Scene *scene)
static ViewLayer * view_layer_add(const char *name)
void BKE_view_layer_selected_bases_iterator_next(BLI_Iterator *iter)
static void write_layer_collections(BlendWriter *writer, ListBase *lb)
ViewLayer * BKE_view_layer_find(const Scene *scene, const char *layer_name)
void BKE_layer_collection_isolate_global(Scene *, ViewLayer *view_layer, LayerCollection *lc, bool extend)
static void layer_collection_sync(ViewLayer *view_layer, LayerCollectionResync *layer_resync, BLI_mempool *layer_resync_mempool, ListBase *r_lb_new_object_bases, const short parent_layer_flag, const short parent_collection_restrict, const short parent_layer_restrict, const ushort parent_local_collections_bits)
static void layer_collection_local_visibility_unset_recursive(LayerCollection *layer_collection, const int local_collections_uid)
bool BKE_base_is_visible(const View3D *v3d, const Base *base)
void BKE_scene_collection_sync(const Scene *scene)
bool BKE_object_is_visible_in_viewport(const View3D *v3d, const Object *ob)
void BKE_view_layer_visible_objects_iterator_end(BLI_Iterator *iter)
ViewLayer * BKE_view_layer_context_active_PLACEHOLDER(const Scene *scene)
void BKE_view_layer_selected_bases_iterator_end(BLI_Iterator *iter)
void BKE_view_layer_rename(Main *bmain, Scene *scene, ViewLayer *view_layer, const char *newname)
void BKE_base_set_visible(Scene *scene, ViewLayer *view_layer, Base *base, bool extend)
static void objects_iterator_next(BLI_Iterator *iter, const int flag)
int BKE_layer_collection_count(const ViewLayer *view_layer)
static void layer_collection_flag_unset_recursive(LayerCollection *lc, const int flag)
bool BKE_layer_collection_has_layer_collection(LayerCollection *lc_parent, LayerCollection *lc_child)
void BKE_view_layer_need_resync_tag(ViewLayer *view_layer)
static void objects_iterator_end(BLI_Iterator *iter)
bool BKE_scene_has_object(Scene *scene, Object *ob)
static LayerCollectionResync * layer_collection_resync_find(LayerCollectionResync *layer_resync, Collection *child_collection)
void BKE_main_collection_sync(const Main *bmain)
void BKE_view_layer_free(ViewLayer *view_layer)
static void layer_collection_resync_unused_layers_free(ViewLayer *view_layer, LayerCollectionResync *layer_resync)
static void viewlayer_aov_make_name_unique(ViewLayer *view_layer)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
void BKE_layer_collection_doversion_2_80(const Scene *scene, ViewLayer *view_layer)
void BKE_view_layer_visible_objects_iterator_begin(BLI_Iterator *iter, void *data_in)
ViewLayer * BKE_view_layer_add(Scene *scene, const char *name, ViewLayer *view_layer_source, const int type)
static bool object_bases_iterator_is_valid(const View3D *v3d, Base *base, const int flag)
static void direct_link_layer_collections(BlendDataReader *reader, ViewLayer *view_layer, ListBase *lb, bool master, bool &active_collection_found)
LayerCollection * BKE_layer_collection_from_index(ViewLayer *view_layer, const int index)
static Base * object_base_new(Object *ob)
LayerCollection * BKE_layer_collection_activate_parent(ViewLayer *view_layer, LayerCollection *lc)
static void layer_collections_copy_data(ViewLayer *view_layer_dst, const ViewLayer *view_layer_src, ListBase *layer_collections_dst, const ListBase *layer_collections_src)
void BKE_view_layer_selected_bases_iterator_begin(BLI_Iterator *iter, void *data_in)
static constexpr int no_resync_recurse_max
void BKE_lightgroup_membership_set(LightgroupMembership **lgm, const char *name)
static void layer_eval_view_layer(Depsgraph *depsgraph, Scene *scene, ViewLayer *view_layer)
static void object_bases_iterator_next(BLI_Iterator *iter, const int flag)
int BKE_lightgroup_membership_get(const LightgroupMembership *lgm, char *name)
static void objects_iterator_begin(BLI_Iterator *iter, void *data_in, const int flag)
void BKE_layer_collection_sync(const Scene *scene, ViewLayer *view_layer)
static bool view_layer_objects_base_cache_validate(ViewLayer *view_layer, LayerCollection *layer)
static void view_layer_bases_hash_create(ViewLayer *view_layer, const bool do_base_duplicates_fix)
int BKE_layer_collection_findindex(ViewLayer *view_layer, const LayerCollection *lc)
bool BKE_layer_collection_activate(ViewLayer *view_layer, LayerCollection *lc)
ViewLayerAOV * BKE_view_layer_add_aov(ViewLayer *view_layer)
void BKE_base_eval_flags(Base *base)
ViewLayer * BKE_view_layer_default_render(const Scene *scene)
void BKE_main_view_layers_synced_ensure(const Main *bmain)
static void layer_collection_bases_show_recursive(const Scene *scene, ViewLayer *view_layer, LayerCollection *lc)
void BKE_view_layer_visible_bases_iterator_next(BLI_Iterator *iter)
void BKE_view_layer_base_select_and_set_active(ViewLayer *view_layer, Base *selbase)
static LayerCollection * find_layer_collection_by_scene_collection(LayerCollection *lc, const Collection *collection)
void BKE_layer_collection_local_sync_all(const Main *bmain)
void BKE_view_layer_blend_read_after_liblink(BlendLibReader *, ID *, ViewLayer *view_layer)
void BKE_view_layer_copy_data(Scene *scene_dst, const Scene *, ViewLayer *view_layer_dst, const ViewLayer *view_layer_src, const int flag)
ViewLayer * BKE_view_layer_find_from_collection(const Scene *scene, LayerCollection *lc)
void BKE_view_layer_bases_in_mode_iterator_end(BLI_Iterator *)
void BKE_layer_collection_set_visible(const Scene *scene, ViewLayer *view_layer, LayerCollection *lc, const bool visible, const bool hierarchy)
void BKE_view_layer_visible_objects_iterator_next(BLI_Iterator *iter)
void BKE_view_layer_selected_objects_iterator_next(BLI_Iterator *iter)
static void bke_view_layer_verify_aov_cb(void *userdata, Scene *, ViewLayer *, const char *name, int, const char *, eNodeSocketDatatype)
BMesh const char void * data
BPy_StructRNA * depsgraph
unsigned long long int uint64_t
void RE_engine_update_render_passes(RenderEngine *engine, Scene *scene, ViewLayer *view_layer, update_render_passes_cb_t callback, void *callback_data)
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_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
short flag_from_collection
unsigned short local_view_bits
unsigned short local_collections_bits
struct Collection * collection
CollectionRuntimeHandle * runtime
ListBase children_layer_resync
LayerCollectionResync * parent_layer_resync
LayerCollectionResync * queue_next
LayerCollectionResync * next
LayerCollectionResync * prev
struct LayerCollection * next
ListBase layer_collections
unsigned short local_collections_bits
struct Collection * collection
ObjectRuntimeHandle * runtime
unsigned short base_local_view_bits
struct Collection * master_collection
struct bNodeTree * compositing_node_group
unsigned short local_collections_uid
int object_type_exclude_viewport
unsigned short local_view_uid
struct ViewLayerAOV * prev
struct ViewLayerAOV * next
struct ViewLayerLightgroup * prev
struct ViewLayerLightgroup * next
struct FreestyleConfig freestyle_config
struct IDProperty * id_properties
ViewLayerLightgroup * active_lightgroup
ViewLayerAOV * active_aov
ListBase layer_collections
LayerCollection * active_collection
struct GHash * object_bases_hash
struct Base ** object_bases_array
struct SceneStats * stats
struct IDProperty * system_properties
struct Material * mat_override
struct LightgroupMembership * lightgroup