mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
flame: add frame ranges to representation
This commit is contained in:
parent
aa39f98ae6
commit
26c3ba7e1b
1 changed files with 13 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
|||
"ext": "mov",
|
||||
"xmlPresetFile": "Apple iPad (1920x1080).xml",
|
||||
"xmlPresetDir": "",
|
||||
"representationAddRange": False,
|
||||
"representationAddRange": True,
|
||||
"representationTags": [
|
||||
"review",
|
||||
"delete"
|
||||
|
|
@ -46,6 +46,9 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
|||
if "representations" not in instance.data:
|
||||
instance.data["representations"] = []
|
||||
|
||||
frame_start = instance.data["frameStart"]
|
||||
handle_start = instance.data["handleStart"]
|
||||
frame_start_handle = frame_start - handle_start
|
||||
source_first_frame = instance.data["sourceFirstFrame"]
|
||||
source_start_handles = instance.data["sourceStartH"]
|
||||
source_end_handles = instance.data["sourceEndH"]
|
||||
|
|
@ -139,6 +142,15 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
|||
else:
|
||||
representation_data["files"] = files
|
||||
|
||||
# add frame range
|
||||
if preset_config["representationAddRange"]:
|
||||
representation_data.update({
|
||||
"frameStart": frame_start_handle,
|
||||
"frameEnd": (
|
||||
frame_start_handle + source_duration_handles),
|
||||
"fps": instance.data["fps"]
|
||||
})
|
||||
|
||||
instance.data["representations"].append(representation_data)
|
||||
|
||||
self.log.info("Added representation: {}".format(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue