62static void rna_ViewLayer_active_layer_collection_set(
PointerRNA *
ptr,
85static void rna_LayerObjects_active_object_set(
PointerRNA *
ptr,
95 if (basact_test !=
nullptr) {
96 view_layer->
basact = basact_test;
101 "ViewLayer '%s' does not contain object '%s'",
107 view_layer->
basact =
nullptr;
113 const size_t rna_path_buffer_size)
115 char name_esc[
sizeof(view_layer->
name) * 2];
118 return BLI_snprintf_rlen(r_rna_path, rna_path_buffer_size,
"view_layers[\"%s\"]", name_esc);
121static std::optional<std::string> rna_ViewLayer_path(
const PointerRNA *
ptr)
124 char rna_path[
sizeof(view_layer->
name) * 3];
150static void rna_ViewLayer_update_render_passes(
ID *
id)
153 if (scene->nodetree) {
219static void rna_ViewLayer_update_tagged(
ID *id_ptr,
268static void rna_LayerCollection_name_get(
PointerRNA *
ptr,
char *value)
271 strcpy(value, id->name + 2);
277 return strlen(id->name + 2);
280static void rna_LayerCollection_flag_set(
PointerRNA *
ptr,
const bool value,
const int flag)
293 layer_collection->
flag &= ~flag;
297static void rna_LayerCollection_exclude_set(
PointerRNA *
ptr,
bool value)
302static void rna_LayerCollection_holdout_set(
PointerRNA *
ptr,
bool value)
307static void rna_LayerCollection_indirect_only_set(
PointerRNA *
ptr,
bool value)
312static void rna_LayerCollection_hide_viewport_set(
PointerRNA *
ptr,
bool value)
365static bool rna_LayerCollection_has_selected_objects(
LayerCollection *lc,
371 if (scene_view_layer == view_layer) {
405static bool rna_LayerCollection_children_lookupstring(
PointerRNA *
ptr,
415 if (
STREQ(child->collection->id.name + 2, key)) {
445 prop,
"Name",
"Name of this layer collection (same as its collection one)");
447 prop,
"rna_LayerCollection_name_get",
"rna_LayerCollection_name_length",
nullptr);
455 "rna_LayerCollection_children_begin",
460 "rna_LayerCollection_children_lookupint",
461 "rna_LayerCollection_children_lookupstring",
489 "Objects in collection only contribute indirectly (through shadows and reflections) "
490 "in the view layer");
501 func =
RNA_def_function(srna,
"visible_get",
"rna_LayerCollection_visible_get");
503 "Whether this collection is visible, take into account the "
504 "collection parent and the viewport");
515 "Whether this collection is visible for the view layer, take into "
516 "account the collection parent");
518 func =
RNA_def_function(srna,
"has_objects",
"rna_LayerCollection_has_objects");
523 srna,
"has_selected_objects",
"rna_LayerCollection_has_selected_objects");
527 func,
"view_layer",
"ViewLayer",
"",
"View layer the layer collection belongs to");
545 "rna_LayerObjects_active_object_get",
546 "rna_LayerObjects_active_object_set",
559 "rna_LayerObjects_selected_begin",
560 "rna_iterator_listbase_next",
561 "rna_iterator_listbase_end",
562 "rna_ViewLayer_objects_get",
580 "An object instance in a View Layer (currently never exposed in Python API)");
617 func =
RNA_def_function(srna,
"update_render_passes",
"rna_ViewLayer_update_render_passes");
619 "Requery the enabled render passes from the render engine");
629 "Root of collections hierarchy of this view layer, "
630 "its 'collection' pointer property is the same as the scene's master collection");
635 "rna_ViewLayer_active_layer_collection_get",
636 "rna_ViewLayer_active_layer_collection_set",
641 prop,
"Active Layer Collection",
"Active layer collection in this view layer's hierarchy");
651 "rna_ViewLayer_objects_get",
670 "Has export collections",
671 "At least one Collection in this View Layer has an exporter");
691 func,
"Update data tagged to be updated from previous access to data or operators");
Scene * CTX_data_scene(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
LayerCollection * BKE_view_layer_active_collection_get(ViewLayer *view_layer)
void BKE_view_layer_remove_aov(ViewLayer *view_layer, ViewLayerAOV *aov)
#define FOREACH_OBJECT_END
#define FOREACH_OBJECT_BEGIN(scene, view_layer, _instance)
bool BKE_layer_collection_has_selected_objects(const Scene *scene, ViewLayer *view_layer, LayerCollection *lc)
void BKE_view_layer_verify_aov(RenderEngine *engine, Scene *scene, ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
void BKE_view_layer_need_resync_tag(ViewLayer *view_layer)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
void BKE_layer_collection_set_flag(LayerCollection *lc, int flag, bool value)
int BKE_layer_collection_findindex(ViewLayer *view_layer, const LayerCollection *lc)
bool BKE_layer_collection_activate(ViewLayer *view_layer, LayerCollection *lc)
ListBase * BKE_view_layer_object_bases_get(ViewLayer *view_layer)
ViewLayer * BKE_view_layer_find_from_collection(const Scene *scene, LayerCollection *lc)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
Depsgraph * BKE_scene_ensure_depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer)
void BKE_scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain)
Depsgraph * BKE_scene_get_depsgraph(const Scene *scene, const ViewLayer *view_layer)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_snprintf_rlen(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define BPy_BEGIN_ALLOW_THREADS
#define BPy_END_ALLOW_THREADS
void DEG_id_tag_update(ID *id, unsigned int flags)
bool DEG_is_evaluating(const Depsgraph *depsgraph)
void DEG_make_active(Depsgraph *depsgraph)
void DEG_relations_tag_update(Main *bmain)
Object groups, one object can be in many groups at once.
@ 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_HOLDOUT
Object is a sort of wrapper for general info.
#define BASE_SELECTED(v3d, base)
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
constexpr PointerRNA PointerRNA_NULL
const Depsgraph * depsgraph
RenderEngineType * RE_engines_find(const char *idname)
RenderEngine * RE_engine_create(RenderEngineType *type)
void RE_engine_free(RenderEngine *engine)
void base_select(Base *base, eObjectSelect_Mode mode)
void base_active_refresh(Main *bmain, Scene *scene, ViewLayer *view_layer)
void ntreeCompositUpdateRLayers(bNodeTree *ntree)
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
PointerRNA rna_pointer_inherit_refine(const PointerRNA *ptr, StructRNA *type, void *data)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_define_animate_sdna(bool animate)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void rna_def_freestyle_settings(BlenderRNA *brna)
size_t rna_ViewLayer_path_buffer_get(const ViewLayer *view_layer, char *r_rna_path, const size_t rna_path_buffer_size)
void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, bool scene)
static void rna_def_object_base(BlenderRNA *brna)
static void rna_def_layer_objects(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_layer_collection(BlenderRNA *brna)
void RNA_def_view_layer(BlenderRNA *brna)
ListBaseIterator listbase
union CollectionPropertyIterator::@1329 internal
ListBase layer_collections
unsigned short local_collections_bits
struct Collection * collection
void(* update_render_passes)(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer)
unsigned short local_collections_uid
struct IDProperty * id_properties
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)