Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 558 Lines • ▼ Show 20 Lines | const EnumPropertyItem rna_enum_bake_pass_filter_type_items[] = { | ||||
| {R_BAKE_PASS_FILTER_GLOSSY, "GLOSSY", 0, "Glossy", ""}, | {R_BAKE_PASS_FILTER_GLOSSY, "GLOSSY", 0, "Glossy", ""}, | ||||
| {R_BAKE_PASS_FILTER_TRANSM, "TRANSMISSION", 0, "Transmission", ""}, | {R_BAKE_PASS_FILTER_TRANSM, "TRANSMISSION", 0, "Transmission", ""}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem rna_enum_view_layer_aov_type_items[] = { | static const EnumPropertyItem rna_enum_view_layer_aov_type_items[] = { | ||||
| {AOV_TYPE_COLOR, "COLOR", 0, "Color", ""}, | {AOV_TYPE_COLOR, "COLOR", 0, "Color", ""}, | ||||
| {AOV_TYPE_VALUE, "VALUE", 0, "Value", ""}, | {AOV_TYPE_VALUE, "VALUE", 0, "Value", ""}, | ||||
| {AOV_TYPE_LPE, "LPE", 0, "Light Path Expression", ""}, | |||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| const EnumPropertyItem rna_enum_transform_pivot_items_full[] = { | const EnumPropertyItem rna_enum_transform_pivot_items_full[] = { | ||||
| {V3D_AROUND_CENTER_BOUNDS, | {V3D_AROUND_CENTER_BOUNDS, | ||||
| "BOUNDING_BOX_CENTER", | "BOUNDING_BOX_CENTER", | ||||
| ICON_PIVOT_BOUNDBOX, | ICON_PIVOT_BOUNDBOX, | ||||
| "Bounding Box Center", | "Bounding Box Center", | ||||
| ▲ Show 20 Lines • Show All 2,166 Lines • ▼ Show 20 Lines | if (!ELEM(codec_data->codec, | ||||
| * MPEG4 and WEBM/VP9 codecs. So changing encoder quality mode to | * MPEG4 and WEBM/VP9 codecs. So changing encoder quality mode to | ||||
| * CBR as CRF is not supported. | * CBR as CRF is not supported. | ||||
| */ | */ | ||||
| codec_data->constant_rate_factor = FFM_CRF_NONE; | codec_data->constant_rate_factor = FFM_CRF_NONE; | ||||
| } | } | ||||
| } | } | ||||
| # endif | # endif | ||||
| static int rna_NonLPEAOVs_iter_skip(CollectionPropertyIterator *UNUSED(iter), void *data) | |||||
| { | |||||
| ViewLayerAOV *aov = (ViewLayerAOV *)data; | |||||
| return (aov->type == AOV_TYPE_LPE); | |||||
| } | |||||
| void rna_NonLPEAOVs_iter_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) | |||||
| { | |||||
| ViewLayer *view_layer = (ViewLayer *)ptr->data; | |||||
| rna_iterator_listbase_begin(iter, &view_layer->aovs, rna_NonLPEAOVs_iter_skip); | |||||
| } | |||||
| int rna_NonLPEAOVs_iter_length(PointerRNA *ptr) | |||||
| { | |||||
| ViewLayer *view_layer = (ViewLayer *)ptr->data; | |||||
| int length = 0; | |||||
| LISTBASE_FOREACH (ViewLayerAOV *, aov, &view_layer->aovs) { | |||||
| length += (aov->type != AOV_TYPE_LPE); | |||||
| } | |||||
| return length; | |||||
| } | |||||
| #else | #else | ||||
| /* Grease Pencil Interpolation tool settings */ | /* Grease Pencil Interpolation tool settings */ | ||||
| static void rna_def_gpencil_interpolate(BlenderRNA *brna) | static void rna_def_gpencil_interpolate(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 1,521 Lines • ▼ Show 20 Lines | static void rna_def_view_layer_aov(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Valid", "Is the name of the AOV conflicting"); | RNA_def_property_ui_text(prop, "Valid", "Is the name of the AOV conflicting"); | ||||
| prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "type"); | RNA_def_property_enum_sdna(prop, NULL, "type"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_view_layer_aov_type_items); | RNA_def_property_enum_items(prop, rna_enum_view_layer_aov_type_items); | ||||
| RNA_def_property_enum_default(prop, AOV_TYPE_COLOR); | RNA_def_property_enum_default(prop, AOV_TYPE_COLOR); | ||||
| RNA_def_property_ui_text(prop, "Type", "Data type of the AOV"); | RNA_def_property_ui_text(prop, "Type", "Data type of the AOV"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update"); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update"); | ||||
| prop = RNA_def_property(srna, "light_path_expression", PROP_STRING, PROP_NONE); | |||||
| RNA_def_property_string_sdna(prop, NULL, "lpe"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_ui_text(prop, "Expression", "Regular expression for matching the light path"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update"); | |||||
| } | } | ||||
| static void rna_def_view_layer_lightgroups(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_view_layer_lightgroups(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| /* PropertyRNA *prop; */ | /* PropertyRNA *prop; */ | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| ▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | if (scene) { | ||||
| RNA_def_property_ui_text(prop, "Eevee Settings", "View layer settings for Eevee"); | RNA_def_property_ui_text(prop, "Eevee Settings", "View layer settings for Eevee"); | ||||
| prop = RNA_def_property(srna, "aovs", PROP_COLLECTION, PROP_NONE); | prop = RNA_def_property(srna, "aovs", PROP_COLLECTION, PROP_NONE); | ||||
| RNA_def_property_collection_sdna(prop, NULL, "aovs", NULL); | RNA_def_property_collection_sdna(prop, NULL, "aovs", NULL); | ||||
| RNA_def_property_struct_type(prop, "AOV"); | RNA_def_property_struct_type(prop, "AOV"); | ||||
| RNA_def_property_ui_text(prop, "Shader AOV", ""); | RNA_def_property_ui_text(prop, "Shader AOV", ""); | ||||
| rna_def_view_layer_aovs(brna, prop); | rna_def_view_layer_aovs(brna, prop); | ||||
| prop = RNA_def_property(srna, "non_lpe_aovs", PROP_COLLECTION, PROP_NONE); | |||||
| RNA_def_property_struct_type(prop, "AOV"); | |||||
| RNA_def_property_ui_text(prop, "Non LPE Shader AOV", ""); | |||||
| RNA_def_property_collection_funcs(prop, | |||||
| "rna_NonLPEAOVs_iter_begin", | |||||
| "rna_iterator_listbase_next", | |||||
| "rna_iterator_listbase_end", | |||||
| "rna_iterator_listbase_get", | |||||
| "rna_NonLPEAOVs_iter_length", | |||||
| NULL, | |||||
| NULL, | |||||
| NULL); | |||||
| prop = RNA_def_property(srna, "active_aov", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "active_aov", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "AOV"); | RNA_def_property_struct_type(prop, "AOV"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Shader AOV", "Active AOV"); | RNA_def_property_ui_text(prop, "Shader AOV", "Active AOV"); | ||||
| prop = RNA_def_property(srna, "active_aov_index", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "active_aov_index", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_int_funcs(prop, | RNA_def_property_int_funcs(prop, | ||||
| "rna_ViewLayer_active_aov_index_get", | "rna_ViewLayer_active_aov_index_get", | ||||
| ▲ Show 20 Lines • Show All 3,900 Lines • Show Last 20 Lines | |||||