Skip to content

Commit

Permalink
support separated AOVs in arnold render
Browse files Browse the repository at this point in the history
  • Loading branch information
MustafaJafar committed Aug 20, 2024
1 parent c239540 commit a7c1caa
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions client/ayon_houdini/plugins/publish/collect_arnold_rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,31 @@ def process(self, instance):
multipartExr = True

num_aovs = rop.evalParm("ar_aovs")
# TODO: Check the following logic.
# as it always assumes that all AOV are not merged.

for index in range(1, num_aovs + 1):
# Skip disabled AOVs
if not rop.evalParm("ar_enable_aov{}".format(index)):

aov_enabled = rop.evalParm("ar_enable_aov{}".format(index))
aov_sep = rop.evalParm("ar_aov_separate{}".format(index))
aov_path = rop.evalParm("ar_aov_separate_file{}".format(index))

# Skip disabled AOVs or AOVs with no separate aov file path
if not all((aov_enabled, aov_path, aov_sep)):
continue

if rop.evalParm("ar_aov_exr_enable_layer_name{}".format(index)):
label = rop.evalParm("ar_aov_exr_layer_name{}".format(index))
else:
label = evalParmNoFrame(rop, "ar_aov_label{}".format(index))

aov_product = self.get_render_product_name(default_prefix,
suffix=label)
# NOTE:
# we don't collect the actual AOV path but rather assume
# the user has used the default beauty path (collected above)
# with the AOV name before the extension.
# Also, Note that Ayon Publishing does not require a specific file name,
# as it will be renamed according to the naming conventions set in the publish template.
aov_product = self.get_render_product_name(
prefix=default_prefix, suffix=label
)
render_products.append(aov_product)
files_by_aov[label] = self.generate_expected_files(instance,
aov_product)
Expand Down

0 comments on commit a7c1caa

Please sign in to comment.