🐛 fix rfm api context for getting displays and multipart flag

This commit is contained in:
Ondřej Samohel 2022-07-14 16:31:32 +02:00
parent 70d6836bc8
commit c3649e0a57
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -1087,7 +1087,7 @@ class RenderProductsRenderman(ARenderProducts):
"d_tiff": "tif"
}
displays = get_displays()["displays"]
displays = get_displays(override_dst="render")["displays"]
for name, display in displays.items():
enabled = display["params"]["enable"]["value"]
if not enabled:
@ -1106,9 +1106,16 @@ class RenderProductsRenderman(ARenderProducts):
display["driverNode"]["type"], "exr")
for camera in cameras:
product = RenderProduct(productName=aov_name,
ext=extensions,
camera=camera)
# Create render product and set it as multipart only on
# display types supporting it. In all other cases, Renderman
# will create separate output per channel.
product = RenderProduct(
productName=aov_name,
ext=extensions,
camera=camera,
multipart=display["driverNode"]["type"] in ["d_openexr", "d_deepexr", "d_tiff"] # noqa
)
products.append(product)
return products