Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support merged AOVs in arnold render #72

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -67,20 +67,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.
BigRoy marked this conversation as resolved.
Show resolved Hide resolved
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