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

Maya: Fix Redshift cryptomatte multipartEXR #6240

Merged
25 changes: 21 additions & 4 deletions openpype/pipeline/farm/pyblish_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,15 +620,32 @@ def _create_instances_for_aov(instance, skeleton, aov_filter, additional_data,
aov_patterns = aov_filter

preview = match_aov_pattern(app, aov_patterns, render_file_name)
# toggle preview on if multipart is on
if instance.data.get("multipartExr"):
log.debug("Adding preview tag because its multipartExr")
preview = True

new_instance = deepcopy(skeleton)
new_instance["subset"] = subset_name
new_instance["subsetGroup"] = group_name

# toggle preview on if multipart is on
# Because we cant query the multipartExr data member of each AOV we'll
# need to have hardcoded rule of excluding any renders with
# "cryptomatte" in the file name from being a multipart EXR. This issue
# happens with Redshift that forces Cryptomatte renders to be separate
# files even when the rest of the AOVs are merged into a single EXR.
# There might be an edge case where the main instance has cryptomatte
# in the name even though it's a multipart EXR.
if instance.data.get("renderer") == "redshift":
if (
instance.data.get("multipartExr") and
"cryptomatte" not in render_file_name.lower()
):
log.debug("Adding preview tag because it's multipartExr")
preview = True
else:
new_instance["multipartExr"] = False
elif instance.data.get("multipartExr"):
log.debug("Adding preview tag because its multipartExr")
preview = True

# explicitly disable review by user
preview = preview and not do_not_add_review
if preview:
Expand Down
Loading