From bc0df1cf3afaa88a7c97fdcb45859d3e869482a2 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 2 Jun 2021 16:11:38 +0200 Subject: [PATCH] Hiero: new retime and old retime to archived effects --- .../plugins/publish/precollect_oito_retime.py | 28 +++++++++++++++++++ .../precollect_retime.py | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 openpype/hosts/hiero/plugins/publish/precollect_oito_retime.py rename openpype/hosts/hiero/plugins/{publish => publish_old_workflow}/precollect_retime.py (99%) diff --git a/openpype/hosts/hiero/plugins/publish/precollect_oito_retime.py b/openpype/hosts/hiero/plugins/publish/precollect_oito_retime.py new file mode 100644 index 0000000000..53363eb7cb --- /dev/null +++ b/openpype/hosts/hiero/plugins/publish/precollect_oito_retime.py @@ -0,0 +1,28 @@ +from pyblish import api +from openpype.lib import editorial +reload(editorial) + + +class PrecollectOTIORetime(api.InstancePlugin): + """Calculate Retiming of selected track items.""" + + order = api.CollectorOrder - 0.578 + label = "Precollect OTIO Retime" + hosts = ["hiero"] + families = ["clip"] + + def process(self, instance): + handle_start = instance.data["handleStart"] + handle_end = instance.data["handleEnd"] + + # get basic variables + otio_clip = instance.data["otioClip"] + retimed_attributes = editorial.get_media_range_with_retimes( + otio_clip, handle_start, handle_end) + self.log.debug( + ">> media_in, media_out: {}".format(retimed_attributes)) + + media_in = retimed_attributes["mediaIn"] + media_out = retimed_attributes["mediaOut"] + handles_start = retimed_attributes["handleStart"] + handles_end = retimed_attributes["handleEnd"] diff --git a/openpype/hosts/hiero/plugins/publish/precollect_retime.py b/openpype/hosts/hiero/plugins/publish_old_workflow/precollect_retime.py similarity index 99% rename from openpype/hosts/hiero/plugins/publish/precollect_retime.py rename to openpype/hosts/hiero/plugins/publish_old_workflow/precollect_retime.py index eb64569790..de05414c88 100644 --- a/openpype/hosts/hiero/plugins/publish/precollect_retime.py +++ b/openpype/hosts/hiero/plugins/publish_old_workflow/precollect_retime.py @@ -9,7 +9,7 @@ class PrecollectRetime(api.InstancePlugin): order = api.CollectorOrder - 0.578 label = "Precollect Retime" hosts = ["hiero"] - families = ['retime'] + families = ['retime_'] def process(self, instance): if not instance.data.get("versionData"):