flame: version frame start was wrong if handles included was off

This commit is contained in:
Jakub Jezek 2022-09-15 16:15:14 +02:00
parent cfe997dac7
commit d1d2d05ec6
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -136,6 +136,9 @@ class ExtractSubsetResources(openpype.api.Extractor):
source_duration_handles = (
source_end_handles - source_start_handles) + 1
self.log.debug("_ source_duration_handles: {}".format(
source_duration_handles))
# create staging dir path
staging_dir = self.staging_dir(instance)
@ -159,18 +162,28 @@ class ExtractSubsetResources(openpype.api.Extractor):
if version_data:
instance.data["versionData"].update(version_data)
# version data start frame
vd_frame_start = frame_start
if include_handles:
vd_frame_start = frame_start_handle
if r_speed != 1.0:
instance.data["versionData"].update({
"frameStart": frame_start_handle,
"frameStart": vd_frame_start,
"frameEnd": (
(frame_start_handle + source_duration_handles - 1)
(vd_frame_start + source_duration_handles - 1)
- (r_handle_start + r_handle_end)
)
})
if not retimed_handles:
instance.data["versionData"].update({
"handleStart": handle_start,
"handleEnd": handle_end
"handleEnd": handle_end,
"frameStart": vd_frame_start,
"frameEnd": (
(vd_frame_start + source_duration_handles - 1)
- (handle_start + handle_end)
)
})
self.log.debug("_ i_version_data: {}".format(
instance.data["versionData"]