mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge pull request #4297 from tokejepsen/bugfix/OP-4616_vray_multipart
This commit is contained in:
commit
4cd66ac33e
2 changed files with 29 additions and 9 deletions
|
|
@ -797,6 +797,11 @@ class RenderProductsVray(ARenderProducts):
|
|||
if default_ext in {"exr (multichannel)", "exr (deep)"}:
|
||||
default_ext = "exr"
|
||||
|
||||
# Define multipart.
|
||||
multipart = False
|
||||
if image_format_str == "exr (multichannel)":
|
||||
multipart = True
|
||||
|
||||
products = []
|
||||
|
||||
# add beauty as default when not disabled
|
||||
|
|
@ -804,23 +809,28 @@ class RenderProductsVray(ARenderProducts):
|
|||
if not dont_save_rgb:
|
||||
for camera in cameras:
|
||||
products.append(
|
||||
RenderProduct(productName="",
|
||||
ext=default_ext,
|
||||
camera=camera))
|
||||
RenderProduct(
|
||||
productName="",
|
||||
ext=default_ext,
|
||||
camera=camera,
|
||||
multipart=multipart
|
||||
)
|
||||
)
|
||||
|
||||
# separate alpha file
|
||||
separate_alpha = self._get_attr("vraySettings.separateAlpha")
|
||||
if separate_alpha:
|
||||
for camera in cameras:
|
||||
products.append(
|
||||
RenderProduct(productName="Alpha",
|
||||
ext=default_ext,
|
||||
camera=camera)
|
||||
RenderProduct(
|
||||
productName="Alpha",
|
||||
ext=default_ext,
|
||||
camera=camera,
|
||||
multipart=multipart
|
||||
)
|
||||
)
|
||||
|
||||
if image_format_str == "exr (multichannel)":
|
||||
if multipart:
|
||||
# AOVs are merged in m-channel file, only main layer is rendered
|
||||
self.multipart = True
|
||||
return products
|
||||
|
||||
# handle aovs from references
|
||||
|
|
|
|||
|
|
@ -514,6 +514,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
# toggle preview on if multipart is on
|
||||
|
||||
if instance_data.get("multipartExr"):
|
||||
self.log.debug("Adding preview tag because its multipartExr")
|
||||
preview = True
|
||||
self.log.debug("preview:{}".format(preview))
|
||||
new_instance = deepcopy(instance_data)
|
||||
|
|
@ -593,6 +594,9 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
if instance["useSequenceForReview"]:
|
||||
# toggle preview on if multipart is on
|
||||
if instance.get("multipartExr", False):
|
||||
self.log.debug(
|
||||
"Adding preview tag because its multipartExr"
|
||||
)
|
||||
preview = True
|
||||
else:
|
||||
render_file_name = list(collection)[0]
|
||||
|
|
@ -700,8 +704,14 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
if preview:
|
||||
if "ftrack" not in families:
|
||||
if os.environ.get("FTRACK_SERVER"):
|
||||
self.log.debug(
|
||||
"Adding \"ftrack\" to families because of preview tag."
|
||||
)
|
||||
families.append("ftrack")
|
||||
if "review" not in families:
|
||||
self.log.debug(
|
||||
"Adding \"review\" to families because of preview tag."
|
||||
)
|
||||
families.append("review")
|
||||
instance["families"] = families
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue