diff --git a/client/ayon_houdini/plugins/publish/collect_arnold_rop.py b/client/ayon_houdini/plugins/publish/collect_arnold_rop.py index bebdb789de..542bc19d9e 100644 --- a/client/ayon_houdini/plugins/publish/collect_arnold_rop.py +++ b/client/ayon_houdini/plugins/publish/collect_arnold_rop.py @@ -67,11 +67,15 @@ 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)): @@ -79,8 +83,15 @@ def process(self, instance): 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)