template_name is 100% per representation now

This commit is contained in:
iLLiCiTiT 2020-03-25 16:27:53 +01:00
parent fe7a677621
commit d9686af193

View file

@ -88,6 +88,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
"project", "asset", "task", "subset", "version", "representation",
"family", "hierarchy", "task", "username"
]
default_template_name = "publish"
def process(self, instance):
@ -260,7 +261,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
# Each should be a single representation (as such, a single extension)
representations = []
destination_list = []
template_name = 'publish'
if 'transfers' not in instance.data:
instance.data['transfers'] = []
@ -287,8 +288,10 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
files = repre['files']
if repre.get('stagingDir'):
stagingdir = repre['stagingDir']
if repre.get('anatomy_template'):
template_name = repre['anatomy_template']
template_name = (
repre.get('anatomy_template') or self.default_template_name
)
if repre.get("outputName"):
template_data["output"] = repre['outputName']