mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Updated aov list
This commit is contained in:
parent
1eb07bcedb
commit
2f58708f58
2 changed files with 90 additions and 22 deletions
|
|
@ -100,36 +100,69 @@ def set_render_format(ext, multilayer):
|
|||
image_settings.file_format = "TIFF"
|
||||
|
||||
|
||||
def set_render_passes(settings):
|
||||
aov_list = (settings["blender"]
|
||||
["RenderSettings"]
|
||||
["aov_list"])
|
||||
|
||||
custom_passes = (settings["blender"]
|
||||
["RenderSettings"]
|
||||
["custom_passes"])
|
||||
def set_render_passes(settings, renderer):
|
||||
aov_list = settings["blender"]["RenderSettings"]["aov_list"]
|
||||
custom_passes = settings["blender"]["RenderSettings"]["custom_passes"]
|
||||
|
||||
# Common passes for both renderers
|
||||
vl = bpy.context.view_layer
|
||||
|
||||
# Data Passes
|
||||
vl.use_pass_combined = "combined" in aov_list
|
||||
vl.use_pass_z = "z" in aov_list
|
||||
vl.use_pass_mist = "mist" in aov_list
|
||||
vl.use_pass_normal = "normal" in aov_list
|
||||
|
||||
# Light Passes
|
||||
vl.use_pass_diffuse_direct = "diffuse_light" in aov_list
|
||||
vl.use_pass_diffuse_color = "diffuse_color" in aov_list
|
||||
vl.use_pass_glossy_direct = "specular_light" in aov_list
|
||||
vl.use_pass_glossy_color = "specular_color" in aov_list
|
||||
vl.eevee.use_pass_volume_direct = "volume_light" in aov_list
|
||||
vl.use_pass_emit = "emission" in aov_list
|
||||
vl.use_pass_environment = "environment" in aov_list
|
||||
vl.use_pass_shadow = "shadow" in aov_list
|
||||
vl.use_pass_ambient_occlusion = "ao" in aov_list
|
||||
|
||||
cycles = vl.cycles
|
||||
# Cryptomatte Passes
|
||||
vl.use_pass_cryptomatte_object = "cryptomatte_object" in aov_list
|
||||
vl.use_pass_cryptomatte_material = "cryptomatte_material" in aov_list
|
||||
vl.use_pass_cryptomatte_asset = "cryptomatte_asset" in aov_list
|
||||
|
||||
cycles.denoising_store_passes = "denoising" in aov_list
|
||||
cycles.use_pass_volume_direct = "volume_direct" in aov_list
|
||||
cycles.use_pass_volume_indirect = "volume_indirect" in aov_list
|
||||
if renderer == "BLENDER_EEVEE":
|
||||
# Eevee exclusive passes
|
||||
eevee = vl.eevee
|
||||
|
||||
# Light Passes
|
||||
vl.use_pass_shadow = "shadow" in aov_list
|
||||
eevee.use_pass_volume_direct = "volume_light" in aov_list
|
||||
|
||||
# Effects Passes
|
||||
eevee.use_pass_bloom = "bloom" in aov_list
|
||||
eevee.use_pass_transparent = "transparent" in aov_list
|
||||
|
||||
# Cryptomatte Passes
|
||||
vl.use_pass_cryptomatte_accurate = "cryptomatte_accurate" in aov_list
|
||||
elif renderer == "CYCLES":
|
||||
# Cycles exclusive passes
|
||||
cycles = vl.cycles
|
||||
|
||||
# Data Passes
|
||||
vl.use_pass_position = "position" in aov_list
|
||||
vl.use_pass_vector = "vector" in aov_list
|
||||
vl.use_pass_uv = "uv" in aov_list
|
||||
cycles.denoising_store_passes = "denoising" in aov_list
|
||||
vl.use_pass_object_index = "object_index" in aov_list
|
||||
vl.use_pass_material_index = "material_index" in aov_list
|
||||
cycles.pass_debug_sample_count = "sample_count" in aov_list
|
||||
|
||||
# Light Passes
|
||||
vl.use_pass_diffuse_indirect = "diffuse_indirect" in aov_list
|
||||
vl.use_pass_glossy_indirect = "specular_indirect" in aov_list
|
||||
vl.use_pass_transmission_direct = "transmission_direct" in aov_list
|
||||
vl.use_pass_transmission_indirect = "transmission_indirect" in aov_list
|
||||
vl.use_pass_transmission_color = "transmission_color" in aov_list
|
||||
cycles.use_pass_volume_direct = "volume_light" in aov_list
|
||||
cycles.use_pass_volume_indirect = "volume_indirect" in aov_list
|
||||
cycles.use_pass_shadow_catcher = "shadow" in aov_list
|
||||
|
||||
aovs_names = [aov.name for aov in vl.aovs]
|
||||
for cp in custom_passes:
|
||||
|
|
@ -266,6 +299,7 @@ def prepare_rendering(asset_group):
|
|||
|
||||
set_render_format(ext, multilayer)
|
||||
bpy.context.scene.render.engine = renderer
|
||||
aov_list, custom_passes = set_render_passes(settings, renderer)
|
||||
|
||||
output_path = Path.joinpath(dirpath, render_folder, file_name)
|
||||
|
||||
|
|
|
|||
|
|
@ -39,18 +39,52 @@ def aov_list_enum():
|
|||
{"value": "z", "label": "Z"},
|
||||
{"value": "mist", "label": "Mist"},
|
||||
{"value": "normal", "label": "Normal"},
|
||||
{"value": "diffuse_light", "label": "Diffuse Light"},
|
||||
{"value": "position", "label": "Position (Cycles Only)"},
|
||||
{"value": "vector", "label": "Vector (Cycles Only)"},
|
||||
{"value": "uv", "label": "UV (Cycles Only)"},
|
||||
{"value": "denoising", "label": "Denoising Data (Cycles Only)"},
|
||||
{"value": "object_index", "label": "Object Index (Cycles Only)"},
|
||||
{"value": "material_index", "label": "Material Index (Cycles Only)"},
|
||||
{"value": "sample_count", "label": "Sample Count (Cycles Only)"},
|
||||
{"value": "diffuse_light", "label": "Diffuse Light/Direct"},
|
||||
{
|
||||
"value": "diffuse_indirect",
|
||||
"label": "Diffuse Indirect (Cycles Only)"
|
||||
},
|
||||
{"value": "diffuse_color", "label": "Diffuse Color"},
|
||||
{"value": "specular_light", "label": "Specular Light"},
|
||||
{"value": "specular_color", "label": "Specular Color"},
|
||||
{"value": "volume_light", "label": "Volume Light"},
|
||||
{"value": "specular_light", "label": "Specular (Glossy) Light/Direct"},
|
||||
{
|
||||
"value": "specular_indirect",
|
||||
"label": "Specular (Glossy) Indirect (Cycles Only)"
|
||||
},
|
||||
{"value": "specular_color", "label": "Specular (Glossy) Color"},
|
||||
{
|
||||
"value": "transmission_light",
|
||||
"label": "Transmission Light/Direct (Cycles Only)"
|
||||
},
|
||||
{
|
||||
"value": "transmission_indirect",
|
||||
"label": "Transmission Indirect (Cycles Only)"
|
||||
},
|
||||
{
|
||||
"value": "transmission_color",
|
||||
"label": "Transmission Color (Cycles Only)"
|
||||
},
|
||||
{"value": "volume_light", "label": "Volume Light/Direct"},
|
||||
{"value": "volume_indirect", "label": "Volume Indirect (Cycles Only)"},
|
||||
{"value": "emission", "label": "Emission"},
|
||||
{"value": "environment", "label": "Environment"},
|
||||
{"value": "shadow", "label": "Shadow"},
|
||||
{"value": "shadow", "label": "Shadow/Shadow Catcher"},
|
||||
{"value": "ao", "label": "Ambient Occlusion"},
|
||||
{"value": "denoising", "label": "Denoising"},
|
||||
{"value": "volume_direct", "label": "Direct Volumetric Scattering"},
|
||||
{"value": "volume_indirect", "label": "Indirect Volumetric Scattering"}
|
||||
{"value": "bloom", "label": "Bloom (Eevee Only)"},
|
||||
{"value": "transparent", "label": "Transparent (Eevee Only)"},
|
||||
{"value": "cryptomatte_object", "label": "Cryptomatte Object"},
|
||||
{"value": "cryptomatte_material", "label": "Cryptomatte Material"},
|
||||
{"value": "cryptomatte_asset", "label": "Cryptomatte Asset"},
|
||||
{
|
||||
"value": "cryptomatte_accurate",
|
||||
"label": "Cryptomatte Accurate Mode (Eevee Only)"
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue