Added default variant to workfile collectors for PS|AE

Will only propagate in workfile subset (and final published name of workfile) if {variant} is used in subset name template. (By default it isn't.)
This commit is contained in:
Petr Kalis 2022-08-22 16:48:32 +02:00
parent 3f805bcf83
commit 5df9c1b41f
2 changed files with 6 additions and 2 deletions

View file

@ -11,6 +11,8 @@ class CollectWorkfile(pyblish.api.ContextPlugin):
label = "Collect After Effects Workfile Instance"
order = pyblish.api.CollectorOrder + 0.1
default_variant = "Main"
def process(self, context):
existing_instance = None
for instance in context:
@ -71,7 +73,7 @@ class CollectWorkfile(pyblish.api.ContextPlugin):
family = "workfile"
subset = get_subset_name_with_asset_doc(
family,
"",
self.default_variant,
context.data["anatomyData"]["task"]["name"],
context.data["assetEntity"],
context.data["anatomyData"]["project"]["name"],

View file

@ -11,6 +11,8 @@ class CollectWorkfile(pyblish.api.ContextPlugin):
label = "Collect Workfile"
hosts = ["photoshop"]
default_variant = "Main"
def process(self, context):
existing_instance = None
for instance in context:
@ -22,7 +24,7 @@ class CollectWorkfile(pyblish.api.ContextPlugin):
family = "workfile"
subset = get_subset_name_with_asset_doc(
family,
"",
self.default_variant,
context.data["anatomyData"]["task"]["name"],
context.data["assetEntity"],
context.data["anatomyData"]["project"]["name"],