From cf01f447265170fbd009d88e24cf2686018de793 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 4 Dec 2019 15:09:16 +0100 Subject: [PATCH] feat(nks): collect review identify if mediaSource needs to be trimed --- pype/plugins/nukestudio/publish/collect_reviews.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pype/plugins/nukestudio/publish/collect_reviews.py b/pype/plugins/nukestudio/publish/collect_reviews.py index f9032b2ca4..c127b977e6 100644 --- a/pype/plugins/nukestudio/publish/collect_reviews.py +++ b/pype/plugins/nukestudio/publish/collect_reviews.py @@ -100,6 +100,19 @@ class CollectReviews(api.InstancePlugin): "name": "preview", "ext": ext } + + # if int(rev_inst.data.get("sourceIn")) > + mediaDuration = instance.data.get("mediaDuration") + clipDuration = instance.data.get("clipDuration") + + if mediaDuration > clipDuration: + self.log.debug("Media duration higher: {}".format( + (mediaDuration - clipDuration))) + # representation.update({ + # "frameStart": instance.data.get("sourceInH"), + # "frameEnd": instance.data.get("sourceOutH") + # }) + instance.data["representations"].append(representation) self.log.debug("Added representation: {}".format(representation))