🎨 pass render layer to representation context

This commit is contained in:
Ondřej Samohel 2024-05-22 16:49:38 +02:00
parent 61147d2cd5
commit 19c7c04dd7
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
2 changed files with 8 additions and 0 deletions

View file

@ -252,6 +252,9 @@ def create_skeleton_instance(
"colorspace": data.get("colorspace")
}
if data.get("renderlayer"):
instance_skeleton_data["renderlayer"] = data["renderlayer"]
# skip locking version if we are creating v01
instance_version = data.get("version") # take this if exists
if instance_version != 1:

View file

@ -745,6 +745,11 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
if not is_udim:
repre_context["frame"] = first_index_padded
# store `renderlayer` in context if it exists
# to be later used for example by delivery templates
if instance.data.get("renderlayer"):
repre_context["renderlayer"] = instance.data["renderlayer"]
# Update the destination indexes and padding
dst_collection = clique.assemble(dst_filepaths)[0][0]
dst_collection.padding = destination_padding