Skip to content

Commit

Permalink
Fix timecode detection and image sequence source range.
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-ynput committed Oct 23, 2024
1 parent 96194fc commit f6d1c6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions client/ayon_hiero/api/otio/hiero_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ def create_otio_reference(clip):

# get file info for path and start frame
file_info = media_source.fileinfos().pop()
frame_start = file_info.startFrame()
start_frame = file_info.startFrame()
frame_start = media_source.timecodeStart()
path = file_info.filename()

# get padding and other file infos
Expand Down Expand Up @@ -169,7 +170,7 @@ def create_otio_reference(clip):
target_url_base=dirname + os.sep,
name_prefix=file_head,
name_suffix=extension,
start_frame=frame_start,
start_frame=start_frame,
frame_zero_padding=padding,
rate=fps,
available_range=create_otio_time_range(
Expand Down Expand Up @@ -272,9 +273,12 @@ def create_otio_clip(track_item):
name = track_item.name()

media_reference = create_otio_reference(clip)
available_start = media_reference.available_range.start_time
conformed_start_value = available_start.value_rescaled_to(fps)

source_range = create_otio_time_range(
int(source_in),
int(duration),
conformed_start_value + source_in,
duration,
fps
)

Expand Down
2 changes: 1 addition & 1 deletion client/ayon_hiero/plugins/create/create_shot_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def process(self):
# Creator copy of object attributes that are modified during `process`
presets = deepcopy(self.presets)
gui_inputs = deepcopy(self.gui_inputs)

# get key pairs from presets and match it on ui inputs
for k, v in gui_inputs.items():
if v["type"] in ("dict", "section"):
Expand Down

0 comments on commit f6d1c6b

Please sign in to comment.