diff --git a/client/ayon_hiero/api/otio/hiero_export.py b/client/ayon_hiero/api/otio/hiero_export.py index de547f3..dfd758d 100644 --- a/client/ayon_hiero/api/otio/hiero_export.py +++ b/client/ayon_hiero/api/otio/hiero_export.py @@ -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 @@ -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( @@ -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 ) diff --git a/client/ayon_hiero/plugins/create/create_shot_clip.py b/client/ayon_hiero/plugins/create/create_shot_clip.py index 201cf38..183f80f 100644 --- a/client/ayon_hiero/plugins/create/create_shot_clip.py +++ b/client/ayon_hiero/plugins/create/create_shot_clip.py @@ -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"):