mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
feat(sa): publishing clips wip
This commit is contained in:
parent
1e73ba2397
commit
17e3c19d7a
3 changed files with 24 additions and 5 deletions
|
|
@ -99,8 +99,8 @@ class CollectClips(pyblish.api.InstancePlugin):
|
|||
"clipIn": clip_in,
|
||||
"clipOut": clip_out,
|
||||
"clipDuration": clip_duration,
|
||||
"handleStart": asset_data["handleStart"],
|
||||
"handleEnd": asset_data["handleEnd"],
|
||||
"handleStart": int(asset_data["handleStart"]),
|
||||
"handleEnd": int(asset_data["handleEnd"]),
|
||||
"fps": fps,
|
||||
|
||||
# instance properities
|
||||
|
|
|
|||
|
|
@ -109,6 +109,12 @@ class CollectHierarchyInstance(pyblish.api.InstancePlugin):
|
|||
else:
|
||||
instance.data["tasks"] = list()
|
||||
|
||||
# updating hierarchy data
|
||||
self.hierarchy_data.update({
|
||||
"asset": self.shot_name,
|
||||
"task": "conform"
|
||||
})
|
||||
|
||||
def process(self, instance):
|
||||
assets_shared = instance.context.data.get("assetsShared")
|
||||
context = instance.context
|
||||
|
|
@ -126,6 +132,9 @@ class CollectHierarchyInstance(pyblish.api.InstancePlugin):
|
|||
|
||||
self.create_hierarchy(instance)
|
||||
|
||||
# adding anatomyData for burnins
|
||||
instance.data["anatomyData"] = self.hierarchy_data
|
||||
|
||||
label = f"{self.shot_name} ({frame_start}-{frame_end})"
|
||||
instance.data["label"] = label
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import clique
|
|||
import pype.api
|
||||
import pype.lib as plib
|
||||
|
||||
from pprint import pformat
|
||||
|
||||
|
||||
class ExtractShot(pype.api.Extractor):
|
||||
"""Extract shot "mov" and "wav" files."""
|
||||
|
|
@ -52,19 +54,27 @@ class ExtractShot(pype.api.Extractor):
|
|||
instance.data["families"].append("clip")
|
||||
instance.data["family"] = "review"
|
||||
|
||||
# frame ranges
|
||||
frame_start = int(instance.data["frameStart"])
|
||||
frame_end = int(instance.data["frameEnd"])
|
||||
handle_start = int(instance.data["handleStart"])
|
||||
handle_end = int(instance.data["handleEnd"])
|
||||
|
||||
instance.data["representations"].append({
|
||||
"name": ext[1:],
|
||||
"ext": ext[1:],
|
||||
"files": os.path.basename(clip_trimed_path),
|
||||
"stagingDir": staging_dir,
|
||||
"frameStart": instance.data["frameStart"],
|
||||
"frameEnd": instance.data["frameEnd"],
|
||||
"frameStart": frame_start,
|
||||
"frameEnd": frame_end,
|
||||
"frameStartFtrack": frame_start - handle_start,
|
||||
"frameEndFtrack": frame_end - handle_end,
|
||||
"fps": fps,
|
||||
"thumbnail": True,
|
||||
"tags": ["review", "ftrackreview", "delete"]
|
||||
})
|
||||
|
||||
self.log.debug(f"Instance data: {instance.data}")
|
||||
self.log.debug(f"Instance data: {pformat(instance.data)}")
|
||||
|
||||
# # Generate jpegs.
|
||||
# clip_thumbnail = os.path.join(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue