mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
PS - all published instances could be grouped with a task name
Subset in a group will show up together in Loader
This commit is contained in:
parent
efa96c094d
commit
c2a1017c1d
1 changed files with 9 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
import pyblish.api
|
||||
|
||||
from avalon import photoshop
|
||||
|
|
@ -19,6 +20,8 @@ class CollectInstances(pyblish.api.ContextPlugin):
|
|||
families_mapping = {
|
||||
"image": []
|
||||
}
|
||||
# True will add all instances to same group in Loader
|
||||
group_by_task_name = False
|
||||
|
||||
def process(self, context):
|
||||
stub = photoshop.stub()
|
||||
|
|
@ -49,6 +52,12 @@ class CollectInstances(pyblish.api.ContextPlugin):
|
|||
layer_data["family"]
|
||||
]
|
||||
instance.data["publish"] = layer.visible
|
||||
|
||||
if self.group_by_task_name:
|
||||
task = os.getenv("AVALON_TASK", None)
|
||||
sanitized_task_name = task[0].upper() + task[1:]
|
||||
instance.data["subsetGroup"] = sanitized_task_name
|
||||
|
||||
instance_names.append(layer_data["subset"])
|
||||
|
||||
# Produce diagnostic message for any graphical
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue