From ebb903b3a566c8a67671d9bdb95773601353351e Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 24 Oct 2019 14:16:52 +0200 Subject: [PATCH] frames length is based on type of input files --- pype/plugins/global/publish/extract_review_sa.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pype/plugins/global/publish/extract_review_sa.py b/pype/plugins/global/publish/extract_review_sa.py index 541a717964..1379558f47 100644 --- a/pype/plugins/global/publish/extract_review_sa.py +++ b/pype/plugins/global/publish/extract_review_sa.py @@ -122,9 +122,15 @@ class ExtractReviewSaP(pyblish.api.InstancePlugin): output_args = [] # preset's output data output_args.extend(profile.get("output", [])) - - # set length of video by len of inserted files - output_args.append("-frames {}".format(len(repre["files"]))) + + if isinstance(repre["files"], list): + # set length of video by len of inserted files + video_len = len(repre["files"]) + else: + video_len = repre["frameEnd"] - repre["frameStart"] + 1 + output_args.append( + "-frames {}".format(video_len) + ) # letter_box lb_string = (