mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
royalrender using product name and type
This commit is contained in:
parent
591819b558
commit
bd50593b34
3 changed files with 17 additions and 13 deletions
|
|
@ -150,8 +150,8 @@ class CollectSequencesFromJob(pyblish.api.ContextPlugin):
|
|||
|
||||
self.log.info("Found collections: {}".format(collections))
|
||||
|
||||
if data.get("subset") and len(collections) > 1:
|
||||
self.log.error("Forced subset can only work with a single "
|
||||
if data.get("productName") and len(collections) > 1:
|
||||
self.log.error("Forced produce can only work with a single "
|
||||
"found sequence")
|
||||
raise RuntimeError("Invalid sequence")
|
||||
|
||||
|
|
@ -174,8 +174,10 @@ class CollectSequencesFromJob(pyblish.api.ContextPlugin):
|
|||
# Ensure each instance gets a unique reference to the data
|
||||
data = copy.deepcopy(data)
|
||||
|
||||
# If no subset provided, get it from collection's head
|
||||
subset = data.get("subset", collection.head.rstrip("_. "))
|
||||
# If no product provided, get it from collection's head
|
||||
product_name = (
|
||||
data.get("productName", collection.head.rstrip("_. "))
|
||||
)
|
||||
|
||||
# If no start or end frame provided, get it from collection
|
||||
indices = list(collection.indexes)
|
||||
|
|
@ -186,9 +188,9 @@ class CollectSequencesFromJob(pyblish.api.ContextPlugin):
|
|||
|
||||
instance.data.update({
|
||||
"name": str(collection),
|
||||
"family": families[0], # backwards compatibility / pyblish
|
||||
"productType": families[0], # backwards compatibility / pyblish
|
||||
"families": list(families),
|
||||
"subset": subset,
|
||||
"productName": product_name,
|
||||
"folderPath": data.get(
|
||||
"folderPath", context.data["folderPath"]
|
||||
),
|
||||
|
|
|
|||
|
|
@ -15,10 +15,12 @@ class CreateNukeRoyalRenderJob(lib.BaseCreateRoyalRenderJob):
|
|||
super(CreateNukeRoyalRenderJob, self).process(instance)
|
||||
|
||||
# redefinition of families
|
||||
if "render" in instance.data["family"]:
|
||||
if "render" in instance.data["productType"]:
|
||||
instance.data["productType"] = "write"
|
||||
instance.data["family"] = "write"
|
||||
instance.data["families"].insert(0, "render2d")
|
||||
elif "prerender" in instance.data["family"]:
|
||||
elif "prerender" in instance.data["productType"]:
|
||||
instance.data["productType"] = "write"
|
||||
instance.data["family"] = "write"
|
||||
instance.data["families"].insert(0, "prerender")
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ from ayon_core.pipeline.publish import KnownPublishError
|
|||
from ayon_core.pipeline.farm.pyblish_functions import (
|
||||
create_skeleton_instance,
|
||||
create_instances_for_aov,
|
||||
attach_instances_to_subset,
|
||||
attach_instances_to_product,
|
||||
prepare_representations,
|
||||
create_metadata_path
|
||||
)
|
||||
|
|
@ -113,9 +113,9 @@ class CreatePublishRoyalRenderJob(pyblish.api.InstancePlugin,
|
|||
instance_skeleton_data["representations"] += representations
|
||||
instances = [instance_skeleton_data]
|
||||
|
||||
# attach instances to subset
|
||||
# attach instances to product
|
||||
if instance.data.get("attachTo"):
|
||||
instances = attach_instances_to_subset(
|
||||
instances = attach_instances_to_product(
|
||||
instance.data.get("attachTo"), instances
|
||||
)
|
||||
|
||||
|
|
@ -168,8 +168,8 @@ class CreatePublishRoyalRenderJob(pyblish.api.InstancePlugin,
|
|||
|
||||
"""
|
||||
data = instance.data.copy()
|
||||
subset = data["subset"]
|
||||
jobname = "Publish - {subset}".format(subset=subset)
|
||||
product_name = data["productName"]
|
||||
jobname = "Publish - {}".format(product_name)
|
||||
|
||||
# Transfer the environment from the original job to this dependent
|
||||
# job, so they use the same environment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue