mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
Added setting to set AOVs
This commit is contained in:
parent
c9f5a97432
commit
5f901f2a62
3 changed files with 50 additions and 1 deletions
|
|
@ -162,6 +162,29 @@ class CollectBlenderRender(pyblish.api.InstancePlugin):
|
|||
elif ext == "tif":
|
||||
image_settings.file_format = "TIFF"
|
||||
|
||||
@staticmethod
|
||||
def set_render_passes(settings):
|
||||
aov_list = (settings["blender"]
|
||||
["RenderSettings"]
|
||||
["aov_list"])
|
||||
|
||||
scene = bpy.context.scene
|
||||
vl = bpy.context.view_layer
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
def _create_context(self):
|
||||
context = bpy.context.copy()
|
||||
|
||||
|
|
@ -276,6 +299,8 @@ class CollectBlenderRender(pyblish.api.InstancePlugin):
|
|||
ext = self.get_image_format(settings)
|
||||
multilayer = self.get_multilayer(settings)
|
||||
|
||||
self.set_render_passes(settings)
|
||||
|
||||
output_path = os.path.join(file_path, render_folder, file_name)
|
||||
|
||||
render_product = self.get_render_product(output_path, instance)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
"default_render_image_folder": "renders/blender",
|
||||
"aov_separator": "underscore",
|
||||
"image_format": "exr",
|
||||
"multilayer_exr": true
|
||||
"multilayer_exr": true,
|
||||
"aov_list": []
|
||||
},
|
||||
"workfile_builder": {
|
||||
"create_first_version": false,
|
||||
|
|
|
|||
|
|
@ -98,6 +98,29 @@
|
|||
"key": "multilayer_exr",
|
||||
"type": "boolean",
|
||||
"label": "Multilayer (EXR)"
|
||||
},
|
||||
{
|
||||
"key": "aov_list",
|
||||
"label": "AOVs to create",
|
||||
"type": "enum",
|
||||
"multiselection": true,
|
||||
"defaults": "empty",
|
||||
"enum_items": [
|
||||
{"empty": "< empty >"},
|
||||
{"combined": "Combined"},
|
||||
{"z": "Z"},
|
||||
{"mist": "Mist"},
|
||||
{"normal": "Normal"},
|
||||
{"diffuse_light": "Diffuse Light"},
|
||||
{"diffuse_color": "Diffuse Color"},
|
||||
{"specular_light": "Specular Light"},
|
||||
{"specular_color": "Specular Color"},
|
||||
{"volume_light": "Volume Light"},
|
||||
{"emission": "Emission"},
|
||||
{"environment": "Environment"},
|
||||
{"shadow": "Shadow"},
|
||||
{"ao": "Ambient Occlusion"}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue