traypublisher: folder path implementation

This commit is contained in:
Jakub Jezek 2023-11-02 16:15:03 +01:00
parent 0550668d3d
commit ae536f2409
No known key found for this signature in database
GPG key ID: 730D7C02726179A7
3 changed files with 8 additions and 3 deletions

View file

@ -319,8 +319,12 @@ class ShotMetadataSolver:
tasks = self._generate_tasks_from_settings(
project_doc)
# generate hierarchy path from parents
hierarchy_path = self._create_hierarchy_path(parents)
return shot_name, {
"hierarchy": self._create_hierarchy_path(parents),
"hierarchy": hierarchy_path,
"folderPath": f"{hierarchy_path}/{shot_name}",
"parents": parents,
"tasks": tasks
}

View file

@ -217,9 +217,10 @@ or updating already created. Publishing will create OTIO file.
}
# Create otio editorial instance
if AYON_SERVER_ENABLED:
asset_name = instance_data["folderPath"]
asset_name = instance_data.pop("folderPath")
else:
asset_name = instance_data["asset"]
asset_doc = get_asset_by_name(self.project_name, asset_name)
if pre_create_data["fps"] == "from_selection":
@ -682,6 +683,7 @@ or updating already created. Publishing will create OTIO file.
# create creator attributes
creator_attributes = {
"asset_name": shot_name,
"Folder path": shot_metadata["folderPath"],
"Parent hierarchy path": shot_metadata["hierarchy"],
"workfile_start_frame": workfile_start_frame,
"fps": fps,

View file

@ -120,7 +120,6 @@ class CollectShotInstance(pyblish.api.InstancePlugin):
frame_dur = frame_end - frame_start
return {
"asset": _cr_attrs["asset_name"],
"fps": float(_cr_attrs["fps"]),
"handleStart": _cr_attrs["handle_start"],
"handleEnd": _cr_attrs["handle_end"],