mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
OP-2766 - Fix creation of subset names in PS review and workfile
This commit is contained in:
parent
c7039e91f8
commit
af092348e5
2 changed files with 18 additions and 2 deletions
|
|
@ -10,6 +10,8 @@ import os
|
|||
|
||||
import pyblish.api
|
||||
|
||||
from openpype.lib import get_subset_name
|
||||
|
||||
|
||||
class CollectReview(pyblish.api.ContextPlugin):
|
||||
"""Gather the active document as review instance.
|
||||
|
|
@ -25,7 +27,13 @@ class CollectReview(pyblish.api.ContextPlugin):
|
|||
def process(self, context):
|
||||
family = "review"
|
||||
task = os.getenv("AVALON_TASK", None)
|
||||
subset = family + task.capitalize()
|
||||
subset = get_subset_name(
|
||||
family,
|
||||
"",
|
||||
task,
|
||||
context.data["assetEntity"]["_id"],
|
||||
host_name="photoshop"
|
||||
)
|
||||
|
||||
instance = context.create_instance(subset)
|
||||
instance.data.update({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import os
|
||||
import pyblish.api
|
||||
|
||||
from openpype.lib import get_subset_name
|
||||
|
||||
|
||||
class CollectWorkfile(pyblish.api.ContextPlugin):
|
||||
"""Collect current script for publish."""
|
||||
|
|
@ -19,7 +21,13 @@ class CollectWorkfile(pyblish.api.ContextPlugin):
|
|||
|
||||
family = "workfile"
|
||||
task = os.getenv("AVALON_TASK", None)
|
||||
subset = family + task.capitalize()
|
||||
subset = get_subset_name(
|
||||
family,
|
||||
"",
|
||||
task,
|
||||
context.data["assetEntity"]["_id"],
|
||||
host_name="photoshop"
|
||||
)
|
||||
|
||||
file_path = context.data["currentFile"]
|
||||
staging_dir = os.path.dirname(file_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue