mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
added definitions of default task names
This commit is contained in:
parent
c20261693a
commit
a898e5bd2b
1 changed files with 7 additions and 2 deletions
|
|
@ -14,6 +14,10 @@ class CollectBatchInstances(pyblish.api.InstancePlugin):
|
|||
families = ["background_batch", "render_mov_batch"]
|
||||
|
||||
# presets
|
||||
default_subset_task = {
|
||||
"background_batch": "background",
|
||||
"render_mov_batch": "compositing"
|
||||
}
|
||||
subsets = {
|
||||
"background_batch": {
|
||||
"backgroundLayout": {
|
||||
|
|
@ -43,9 +47,10 @@ class CollectBatchInstances(pyblish.api.InstancePlugin):
|
|||
asset_name = instance.data["asset"]
|
||||
family = instance.data["family"]
|
||||
|
||||
default_task_name = self.default_subset_task.get(family)
|
||||
for subset_name, subset_data in self.subsets[family].items():
|
||||
instance_name = f"{asset_name}_{subset_name}"
|
||||
task = subset_data.get("task", "background")
|
||||
task_name = subset_data.get("task") or default_task_name
|
||||
|
||||
# create new instance
|
||||
new_instance = context.create_instance(instance_name)
|
||||
|
|
@ -62,7 +67,7 @@ class CollectBatchInstances(pyblish.api.InstancePlugin):
|
|||
|
||||
new_instance.data["label"] = f"{instance_name}"
|
||||
new_instance.data["subset"] = subset_name
|
||||
new_instance.data["task"] = task
|
||||
new_instance.data["task"] = task_name
|
||||
|
||||
if subset_name in self.unchecked_by_default:
|
||||
new_instance.data["publish"] = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue