mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +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(
|
layer_rename_template = layer_rename_template.replace(
|
||||||
"output", "representation")
|
"output", "representation")
|
||||||
|
|
||||||
asset_doc = context["asset"]
|
folder_entity = context["folder"]
|
||||||
subset_doc = context["subset"]
|
subset_doc = context["subset"]
|
||||||
formatting_data = deepcopy(context["representation"]["context"])
|
formatting_data = deepcopy(context["representation"]["context"])
|
||||||
formatting_data["batch"] = self.batch.name.get_value()
|
formatting_data["batch"] = self.batch.name.get_value()
|
||||||
formatting_data.update({
|
formatting_data.update({
|
||||||
"asset": asset_doc["name"],
|
"asset": folder_entity["name"],
|
||||||
"folder": {
|
"folder": {
|
||||||
"name": asset_doc["name"],
|
"name": folder_entity["name"],
|
||||||
},
|
},
|
||||||
"subset": subset_doc["name"],
|
"subset": subset_doc["name"],
|
||||||
"family": subset_doc["data"]["family"],
|
"family": subset_doc["data"]["family"],
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import pyblish.api
|
import pyblish.api
|
||||||
|
|
||||||
from ayon_core.client import get_asset_name_identifier
|
|
||||||
import ayon_core.hosts.flame.api as opfapi
|
import ayon_core.hosts.flame.api as opfapi
|
||||||
from ayon_core.hosts.flame.otio import flame_export
|
from ayon_core.hosts.flame.otio import flame_export
|
||||||
from ayon_core.pipeline.create import get_product_name
|
from ayon_core.pipeline.create import get_product_name
|
||||||
|
|
@ -18,31 +17,27 @@ class CollecTimelineOTIO(pyblish.api.ContextPlugin):
|
||||||
variant = "otioTimeline"
|
variant = "otioTimeline"
|
||||||
|
|
||||||
# main
|
# main
|
||||||
asset_doc = context.data["assetEntity"]
|
folder_entity = context.data["folderEntity"]
|
||||||
task_name = context.data["task"]
|
|
||||||
project = opfapi.get_current_project()
|
project = opfapi.get_current_project()
|
||||||
sequence = opfapi.get_current_sequence(opfapi.CTX.selection)
|
sequence = opfapi.get_current_sequence(opfapi.CTX.selection)
|
||||||
|
|
||||||
# create product name
|
# create product name
|
||||||
product_name = get_product_name(
|
product_name = get_product_name(
|
||||||
context.data["projectName"],
|
context.data["projectName"],
|
||||||
asset_doc,
|
context.data["taskEntity"],
|
||||||
task_name,
|
|
||||||
context.data["hostName"],
|
context.data["hostName"],
|
||||||
product_type,
|
product_type,
|
||||||
variant,
|
variant,
|
||||||
project_settings=context.data["project_settings"]
|
project_settings=context.data["project_settings"]
|
||||||
)
|
)
|
||||||
|
|
||||||
folder_path = get_asset_name_identifier(asset_doc)
|
|
||||||
|
|
||||||
# adding otio timeline to context
|
# adding otio timeline to context
|
||||||
with opfapi.maintained_segment_selection(sequence) as selected_seg:
|
with opfapi.maintained_segment_selection(sequence) as selected_seg:
|
||||||
otio_timeline = flame_export.create_otio_timeline(sequence)
|
otio_timeline = flame_export.create_otio_timeline(sequence)
|
||||||
|
|
||||||
instance_data = {
|
instance_data = {
|
||||||
"name": product_name,
|
"name": product_name,
|
||||||
"folderPath": folder_path,
|
"folderPath": folder_entity["path"],
|
||||||
"productName": product_name,
|
"productName": product_name,
|
||||||
"productType": product_type,
|
"productType": product_type,
|
||||||
"family": product_type,
|
"family": product_type,
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ class IntegrateBatchGroup(pyblish.api.InstancePlugin):
|
||||||
os.makedirs(render_dir_path, mode=0o777)
|
os.makedirs(render_dir_path, mode=0o777)
|
||||||
|
|
||||||
# TODO: add most of these to `imageio/flame/batch/write_node`
|
# 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
|
**anatomy_data
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -322,15 +322,16 @@ class IntegrateBatchGroup(pyblish.api.InstancePlugin):
|
||||||
|
|
||||||
def _get_shot_task_dir_path(self, instance, task_data):
|
def _get_shot_task_dir_path(self, instance, task_data):
|
||||||
project_entity = instance.data["projectEntity"]
|
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"]
|
anatomy = instance.context.data["anatomy"]
|
||||||
project_settings = instance.context.data["project_settings"]
|
project_settings = instance.context.data["project_settings"]
|
||||||
|
|
||||||
return get_workdir(
|
return get_workdir(
|
||||||
project_entity,
|
project_entity,
|
||||||
asset_entity,
|
folder_entity,
|
||||||
task_data["name"],
|
task_entity,
|
||||||
"flame",
|
"flame",
|
||||||
anatomy,
|
anatomy=anatomy,
|
||||||
project_settings=project_settings
|
project_settings=project_settings
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue