mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
global, flame, hiero, resolve, sp: implementing newAssetPublishing
This commit is contained in:
parent
830e79ca17
commit
a3a839181b
6 changed files with 22 additions and 5 deletions
|
|
@ -136,7 +136,8 @@ class CollectTimelineInstances(pyblish.api.ContextPlugin):
|
|||
"tasks": {
|
||||
task["name"]: {"type": task["type"]}
|
||||
for task in self.add_tasks},
|
||||
"representations": []
|
||||
"representations": [],
|
||||
"newAssetPublishing": True
|
||||
})
|
||||
self.log.debug("__ inst_data: {}".format(pformat(inst_data)))
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,8 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
|
|||
"clipAnnotations": annotations,
|
||||
|
||||
# add all additional tags
|
||||
"tags": phiero.get_track_item_tags(track_item)
|
||||
"tags": phiero.get_track_item_tags(track_item),
|
||||
"newAssetPublishing": True
|
||||
})
|
||||
|
||||
# otio clip data
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
|
|||
"publish": resolve.get_publish_attribute(timeline_item),
|
||||
"fps": context.data["fps"],
|
||||
"handleStart": handle_start,
|
||||
"handleEnd": handle_end
|
||||
"handleEnd": handle_end,
|
||||
"newAssetPublishing": True
|
||||
})
|
||||
|
||||
# otio clip data
|
||||
|
|
|
|||
|
|
@ -170,7 +170,8 @@ class CollectInstances(pyblish.api.InstancePlugin):
|
|||
"frameStart": frame_start,
|
||||
"frameEnd": frame_end,
|
||||
"frameStartH": frame_start - handle_start,
|
||||
"frameEndH": frame_end + handle_end
|
||||
"frameEndH": frame_end + handle_end,
|
||||
"newAssetPublishing": True
|
||||
}
|
||||
|
||||
for data_key in instance_data_filter:
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import pyblish.api
|
|||
import openpype.api
|
||||
from openpype.client import (
|
||||
get_representations,
|
||||
get_asset_by_name,
|
||||
get_subset_by_name,
|
||||
get_version_by_name,
|
||||
)
|
||||
|
|
@ -273,6 +274,14 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
|
|||
def register(self, instance, file_transactions, filtered_repres):
|
||||
project_name = legacy_io.active_project()
|
||||
|
||||
# making sure editorial instances have its `assetEntity`
|
||||
if instance.data.get("newAssetPublishing"):
|
||||
asset_doc = get_asset_by_name(
|
||||
project_name,
|
||||
instance.data["asset"]
|
||||
)
|
||||
instance.data["assetEntity"] = asset_doc
|
||||
|
||||
instance_stagingdir = instance.data.get("stagingDir")
|
||||
if not instance_stagingdir:
|
||||
self.log.info((
|
||||
|
|
@ -426,7 +435,7 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
|
|||
"".format(len(prepared_representations)))
|
||||
|
||||
def prepare_subset(self, instance, project_name):
|
||||
asset_doc = instance.data.get("assetEntity")
|
||||
asset_doc = instance.data["assetEntity"]
|
||||
subset_name = instance.data["subset"]
|
||||
self.log.debug("Subset: {}".format(subset_name))
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ class ValidateAssetDocs(pyblish.api.InstancePlugin):
|
|||
if instance.data.get("assetEntity"):
|
||||
self.log.info("Instance has set asset document in its data.")
|
||||
|
||||
elif instance.data.get("newAssetPublishing"):
|
||||
# skip if it is editorial
|
||||
self.log.info("Editorial instance is no need to check...")
|
||||
|
||||
else:
|
||||
raise PublishValidationError((
|
||||
"Instance \"{}\" doesn't have asset document "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue