mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
flame uses folde and task entities
This commit is contained in:
parent
bf4a0a3579
commit
122ee16919
3 changed files with 12 additions and 16 deletions
|
|
@ -59,14 +59,14 @@ class LoadClipBatch(opfapi.ClipLoader):
|
|||
layer_rename_template = layer_rename_template.replace(
|
||||
"output", "representation")
|
||||
|
||||
asset_doc = context["asset"]
|
||||
folder_entity = context["folder"]
|
||||
subset_doc = context["subset"]
|
||||
formatting_data = deepcopy(context["representation"]["context"])
|
||||
formatting_data["batch"] = self.batch.name.get_value()
|
||||
formatting_data.update({
|
||||
"asset": asset_doc["name"],
|
||||
"asset": folder_entity["name"],
|
||||
"folder": {
|
||||
"name": asset_doc["name"],
|
||||
"name": folder_entity["name"],
|
||||
},
|
||||
"subset": subset_doc["name"],
|
||||
"family": subset_doc["data"]["family"],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import pyblish.api
|
||||
|
||||
from ayon_core.client import get_asset_name_identifier
|
||||
import ayon_core.hosts.flame.api as opfapi
|
||||
from ayon_core.hosts.flame.otio import flame_export
|
||||
from ayon_core.pipeline.create import get_product_name
|
||||
|
|
@ -18,31 +17,27 @@ class CollecTimelineOTIO(pyblish.api.ContextPlugin):
|
|||
variant = "otioTimeline"
|
||||
|
||||
# main
|
||||
asset_doc = context.data["assetEntity"]
|
||||
task_name = context.data["task"]
|
||||
folder_entity = context.data["folderEntity"]
|
||||
project = opfapi.get_current_project()
|
||||
sequence = opfapi.get_current_sequence(opfapi.CTX.selection)
|
||||
|
||||
# create product name
|
||||
product_name = get_product_name(
|
||||
context.data["projectName"],
|
||||
asset_doc,
|
||||
task_name,
|
||||
context.data["taskEntity"],
|
||||
context.data["hostName"],
|
||||
product_type,
|
||||
variant,
|
||||
project_settings=context.data["project_settings"]
|
||||
)
|
||||
|
||||
folder_path = get_asset_name_identifier(asset_doc)
|
||||
|
||||
# adding otio timeline to context
|
||||
with opfapi.maintained_segment_selection(sequence) as selected_seg:
|
||||
otio_timeline = flame_export.create_otio_timeline(sequence)
|
||||
|
||||
instance_data = {
|
||||
"name": product_name,
|
||||
"folderPath": folder_path,
|
||||
"folderPath": folder_entity["path"],
|
||||
"productName": product_name,
|
||||
"productType": product_type,
|
||||
"family": product_type,
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ class IntegrateBatchGroup(pyblish.api.InstancePlugin):
|
|||
os.makedirs(render_dir_path, mode=0o777)
|
||||
|
||||
# TODO: add most of these to `imageio/flame/batch/write_node`
|
||||
name = "{project[code]}_{asset}_{task[name]}".format(
|
||||
name = "{project[code]}_{folder[name]}_{task[name]}".format(
|
||||
**anatomy_data
|
||||
)
|
||||
|
||||
|
|
@ -322,15 +322,16 @@ class IntegrateBatchGroup(pyblish.api.InstancePlugin):
|
|||
|
||||
def _get_shot_task_dir_path(self, instance, task_data):
|
||||
project_entity = instance.data["projectEntity"]
|
||||
asset_entity = instance.data["assetEntity"]
|
||||
folder_entity = instance.data["folderEntity"]
|
||||
task_entity = instance.data["taskEntity"]
|
||||
anatomy = instance.context.data["anatomy"]
|
||||
project_settings = instance.context.data["project_settings"]
|
||||
|
||||
return get_workdir(
|
||||
project_entity,
|
||||
asset_entity,
|
||||
task_data["name"],
|
||||
folder_entity,
|
||||
task_entity,
|
||||
"flame",
|
||||
anatomy,
|
||||
anatomy=anatomy,
|
||||
project_settings=project_settings
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue