diff --git a/openpype/lib/__init__.py b/openpype/lib/__init__.py index 457ceb1d56..838c5aa7a1 100644 --- a/openpype/lib/__init__.py +++ b/openpype/lib/__init__.py @@ -139,6 +139,7 @@ from .editorial import ( trim_media_range, range_from_frames, frames_to_secons, + frames_to_timecode, make_sequence_collection ) @@ -246,5 +247,6 @@ __all__ = [ "trim_media_range", "range_from_frames", "frames_to_secons", + "frames_to_timecode", "make_sequence_collection" ] diff --git a/openpype/lib/editorial.py b/openpype/lib/editorial.py index 1dbc4d7954..bf9a0cb506 100644 --- a/openpype/lib/editorial.py +++ b/openpype/lib/editorial.py @@ -137,6 +137,11 @@ def frames_to_secons(frames, framerate): return _ot.to_seconds(rt) +def frames_to_timecode(frames, framerate): + rt = _ot.from_frames(frames, framerate) + return _ot.to_timecode(rt) + + def make_sequence_collection(path, otio_range, metadata): """ Make collection from path otio range and otio metadata.