10#define DNA_DEPRECATED_ALLOW
101 Base *base = MEM_cnew<Base>(
"Object Base");
127 return static_cast<ViewLayer *
>(scene->view_layers.first);
139 return static_cast<ViewLayer *
>(scene->view_layers.first);
145 if (
STREQ(view_layer->name, layer_name)) {
156 return static_cast<ViewLayer *
>(scene->view_layers.first);
162 name =
DATA_(
"ViewLayer");
165 ViewLayer *view_layer = MEM_cnew<ViewLayer>(
"View Layer");
185 for (; sub_collection !=
nullptr; sub_collection = sub_collection->
next) {
198 if (view_layer_source) {
199 name = view_layer_source->
name;
212 view_layer_new = MEM_cnew<ViewLayer>(
"View Layer");
213 *view_layer_new = *view_layer_source;
241 sizeof(view_layer_new->
name));
243 return view_layer_new;
258 sled->free(sled->storage);
284 view_layer->
basact =
nullptr;
304 base->object->flag |= tag;
307 base->object->flag &= ~tag;
372 else if (do_base_duplicates_fix) {
373 if (view_layer->
basact == base) {
374 view_layer->
basact =
nullptr;
380 "Object '%s' has more than one entry in view layer's object bases listbase",
381 base->object->id.name + 2);
397 "View layer out of sync, invoke BKE_view_layer_synced_ensure.");
412 base->flag &= ~BASE_SELECTED;
418 view_layer->
basact = selbase;
440 while (aov_dst !=
nullptr) {
446 aov_dst = aov_dst->
next;
447 aov_src = aov_src->
next;
456 if (lightgroups_src !=
nullptr) {
462 lightgroups_src->
first);
464 while (lightgroup_dst !=
nullptr) {
470 lightgroup_dst = lightgroup_dst->
next;
471 lightgroup_src = lightgroup_src->
next;
478 const ListBase *layer_collections_src)
483 layer_collections_dst->
first);
485 layer_collections_src->
first);
487 while (layer_collection_dst !=
nullptr) {
497 layer_collection_dst = layer_collection_dst->
next;
498 layer_collection_src = layer_collection_src->
next;
514 view_layer_dst->
stats =
nullptr;
525 "View Layer Object Base out of sync, invoke BKE_view_layer_synced_ensure.");
529 if (view_layer_src->
basact == base_src) {
530 view_layer_dst->
basact = base_dst;
546 view_layer_dst, view_layer_src, &view_layer_dst->
aovs, &view_layer_src->
aovs);
559 char oldname[
sizeof(view_layer->
name)];
569 sizeof(view_layer->
name));
571 if (scene->nodetree) {
575 if (node->type == CMP_NODE_R_LAYERS && node->id ==
nullptr) {
576 if (node->custom1 == index) {
590 if (win->scene == scene &&
STREQ(win->view_layer_name, oldname)) {
730 if (i_nested != -1) {
838 layer_resync->
layer = layer;
841 if (parent_layer_resync !=
nullptr) {
845 layer_resync->
is_usable = (layer->collection !=
nullptr);
847 layer_resync->
is_usable && (parent_layer_resync ==
nullptr ||
853 layer_resync->
is_used = parent_layer_resync !=
nullptr ? parent_layer_resync->
is_used :
true;
865 layer_resync, child_layer, mempool);
874 "Old LayerCollection for %s is...\n\tusable: %d\n\tvalid parent: %d\n\tvalid child: "
909 while (queue_head !=
nullptr) {
910 current_layer_resync = queue_head;
911 queue_head = current_layer_resync->
queue_next;
913 if (current_layer_resync->
collection == child_collection &&
931 queue_tail = child_layer_resync;
932 if (queue_head ==
nullptr) {
933 queue_head = queue_tail;
941 sibling_layer_resync,
944 if (sibling_layer_resync == root_layer_resync) {
948 queue_tail->
queue_next = sibling_layer_resync;
950 queue_tail = sibling_layer_resync;
951 if (queue_head ==
nullptr) {
952 queue_head = queue_tail;
958 current_layer_resync =
nullptr;
961 return current_layer_resync;
976 "Freeing unused LayerCollection for %s",
978 "<Deleted Collection>");
987 layer_resync->
layer =
nullptr;
1005 view_layer->
flag &= ~VIEW_LAYER_OUT_OF_SYNC;
1019 scene =
static_cast<const Scene *
>(scene->id.next))
1031 const short collection_restrict,
1032 const short layer_restrict,
1033 const ushort local_collections_bits)
1041 if (cob->ob ==
nullptr) {
1055 base =
static_cast<Base *
>(*base_p);
1056 if (!
ELEM(base, r_lb_new_object_bases->
first, r_lb_new_object_bases->
last)) {
1100 const short parent_layer_flag,
1101 const short parent_collection_restrict,
1102 const short parent_layer_restrict,
1103 const ushort parent_local_collections_bits)
1117 ListBase new_lb_layer = {
nullptr,
nullptr};
1123 Collection *child_collection = child->collection;
1125 if (child_collection ==
nullptr) {
1132 if (child_layer_resync !=
nullptr) {
1137 if (child_layer_resync->
is_used) {
1140 "Found same existing LayerCollection for %s as child of %s",
1141 child_collection->
id.
name,
1147 "Found a valid unused LayerCollection for %s as child of %s, re-using it",
1148 child_collection->
id.
name,
1152 child_layer_resync->
is_used =
true;
1160 child_layer_resync->
layer);
1166 "No available LayerCollection for %s as child of %s, creating a new one",
1167 child_collection->
id.
name,
1171 child_layer->
flag = parent_layer_flag;
1175 child_layer_resync->
collection = child_collection;
1176 child_layer_resync->
layer = child_layer;
1178 child_layer_resync->
is_used =
true;
1189 const ushort child_local_collections_bits = parent_local_collections_bits &
1197 short child_collection_restrict = parent_collection_restrict;
1198 short child_layer_restrict = parent_layer_restrict;
1200 child_collection_restrict |= child_collection->
flag;
1201 child_layer_restrict |= child_layer->
flag;
1207 layer_resync_mempool,
1208 r_lb_new_object_bases,
1210 child_collection_restrict,
1211 child_layer_restrict,
1212 child_local_collections_bits);
1247 layer_resync->
layer,
1248 r_lb_new_object_bases,
1249 parent_collection_restrict,
1250 parent_layer_restrict,
1251 parent_local_collections_bits);
1259 if (layer ==
nullptr) {
1266 if (cob->ob ==
nullptr) {
1272 "Object '%s' from collection '%s' has no entry in view layer's object bases cache",
1273 cob->ob->id.name + 2,
1274 layer->collection->id.name + 2);
1305 first_layer_collection->
collection != scene->master_collection)
1314 scene->master_collection);
1325 if (!scene->master_collection) {
1340 "ViewLayer's first level of children layer collections should always have "
1341 "exactly one item");
1346 "ViewLayer's first layer collection should always be the one for the scene's "
1347 "master collection");
1361 base->flag &= ~g_base_collection_flags;
1362 base->flag_from_collection &= ~g_base_collection_flags;
1372 layer_resync_mempool);
1375 view_layer->
flag &= ~VIEW_LAYER_HAS_EXPORT_COLLECTIONS;
1379 const short parent_exclude = 0, parent_restrict = 0, parent_layer_restrict = 0;
1381 master_layer_resync,
1382 layer_resync_mempool,
1386 parent_layer_restrict,
1391 master_layer_resync =
nullptr;
1395 if (view_layer->
basact == base) {
1396 view_layer->
basact =
nullptr;
1424 else if (active ==
nullptr) {
1453 scene =
static_cast<const Scene *
>(scene->id.next))
1473 scene =
static_cast<Scene *
>(scene->id.next))
1478 if (view_layer->object_bases_hash) {
1480 view_layer->object_bases_hash =
nullptr;
1494 collection =
static_cast<Collection *
>(collection->id.next))
1517 bool changed =
false;
1527 base->
flag &= ~BASE_SELECTED;
1581 if (lc_parent == lc_child) {
1608 base->
flag &= ~BASE_HIDDEN;
1624 if (v3d ==
nullptr) {
1718 lc_parent = lc_iter;
1723 while (lc_parent != lc) {
1724 lc_parent->
flag &= ~LAYER_COLLECTION_HIDE;
1728 lc_parent = lc_iter;
1744 const int local_collections_uid)
1753 const int local_collections_uid)
1764 const ushort local_collections_uid,
1773 if (cob->ob ==
nullptr) {
1801 base->local_collections_bits &= ~local_collections_uid;
1822 View3D *v3d =
static_cast<View3D *
>(area->spacedata.first);
1853 lc_parent = lc_iter;
1858 while (lc_parent != lc) {
1863 lc_parent = lc_iter;
1884 base->
flag &= ~BASE_HIDDEN;
1912 const bool hierarchy)
1926 lc->
flag &= ~LAYER_COLLECTION_HIDE;
1941 const bool restore_flag)
1952 lc->
flag &= ~LAYER_COLLECTION_PREVIOUSLY_EXCLUDED;
2001 if (found !=
nullptr) {
2044 return (base->
flag != 0);
2059 if (base ==
nullptr) {
2060 iter->
data =
nullptr;
2061 iter->
valid =
false;
2093 iter->
valid =
false;
2254 return (base->
object->
type == data->object_type) &&
2255 (base->
object->
mode & data->object_mode) != 0;
2261 Base *base = data->base_active;
2267 if (base ==
nullptr) {
2268 iter->
valid =
false;
2271 iter->
data = data_in;
2275 if (data->object_type < 0) {
2289 if (base == data->base_active) {
2291 base =
static_cast<Base *
>(data->view_layer->object_bases.first);
2309 iter->
valid =
false;
2326 base->
flag &= ~g_base_collection_flags;
2332 base->
flag &= ~BASE_ENABLED_VIEWPORT;
2335 base->
flag &= ~BASE_ENABLED_RENDER;
2338 base->
flag &= ~BASE_SELECTABLE;
2351 base->
flag &= ~BASE_SELECTED;
2425 bool &active_collection_found)
2435 active_collection_found =
true;
2445 view_layer->
stats =
nullptr;
2449 bool active_collection_found =
false;
2453 reader, view_layer, &view_layer->
layer_collections,
true, active_collection_found);
2455 if (!active_collection_found) {
2483 if (base->object ==
nullptr) {
2486 if (view_layer->
basact == base) {
2487 view_layer->
basact =
nullptr;
2502 if (aov ==
nullptr) {
2515 if (aov !=
nullptr) {
2527 aov = MEM_cnew<ViewLayerAOV>(__func__);
2564 GHash *name_count =
static_cast<GHash *
>(userdata);
2586 aov->flag &= ~AOV_CONFLICT;
2591 void **value_p =
static_cast<void **
>(
BLI_ghash_lookup(name_count, aov->name));
2632 DATA_(
"Lightgroup"),
2635 sizeof(lightgroup->
name));
2640 if (lightgroup !=
nullptr) {
2652 lightgroup = MEM_cnew<ViewLayerLightgroup>(__func__);
2665 if (lightgroup->
next) {
2683 if (
BLI_findindex(&view_layer->lightgroups, lightgroup) != -1) {
2700 if (scene !=
nullptr) {
2714 scene->world->lightgroup !=
nullptr)
2726 if (lgm ==
nullptr) {
2735 if (lgm ==
nullptr) {
2738 return strlen(lgm->
name);
2743 if (name[0] !=
'\0') {
2744 if (*lgm ==
nullptr) {
2745 *lgm = MEM_cnew<LightgroupMembership>(__func__);
2747 BLI_strncpy((*lgm)->name, name,
sizeof((*lgm)->name));
2750 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)
ListBase * BKE_view_layer_object_bases_get(ViewLayer *view_layer)
@ LIB_ID_CREATE_NO_USER_REFCOUNT
void id_lib_indirect_weak_link(ID *id)
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
BLI_INLINE bool BLI_listbase_is_empty(const 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)
void void void void void void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count_at_most(const struct ListBase *listbase, int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void void BLI_INLINE bool BLI_listbase_is_single(const struct ListBase *lb)
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)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
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
#define STRNCPY(dst, src)
char char size_t BLI_strncpy_rlen(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) 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 BLI_MUTEX_INITIALIZER
void BLI_mutex_lock(ThreadMutex *mutex)
void BLI_mutex_unlock(ThreadMutex *mutex)
pthread_mutex_t ThreadMutex
#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_INFO(clg_ref, level,...)
#define CLOG_FATAL(clg_ref,...)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_id_tag_update_ex(Main *bmain, 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
@ VIEW_LAYER_CRYPTOMATTE_ACCURATE
@ LAYER_COLLECTION_VISIBLE_VIEW_LAYER
@ LAYER_COLLECTION_HIDE_VIEWPORT
@ LAYER_COLLECTION_HAS_OBJECTS
@ VIEW_LAYER_HAS_EXPORT_COLLECTIONS
@ 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
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)
const Depsgraph * depsgraph
void RE_engine_update_render_passes(RenderEngine *engine, Scene *scene, ViewLayer *view_layer, update_render_passes_cb_t callback, void *callback_data)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
unsigned __int64 uint64_t
short flag_from_collection
unsigned short local_view_bits
unsigned short local_collections_bits
struct Collection * collection
Collection_Runtime 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
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
float pass_alpha_threshold
struct Material * mat_override