From ce618a05cef8d20cef62aee41ebde7fd2d7ea086 Mon Sep 17 00:00:00 2001 From: n-jay Date: Fri, 2 Feb 2024 14:17:16 +0530 Subject: [PATCH] Update Blender command with tokens for animation frame range --- cuesubmit/cuesubmit/Submission.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/cuesubmit/cuesubmit/Submission.py b/cuesubmit/cuesubmit/Submission.py index 9afd220e7..7fd32555e 100644 --- a/cuesubmit/cuesubmit/Submission.py +++ b/cuesubmit/cuesubmit/Submission.py @@ -75,15 +75,10 @@ def buildBlenderCmd(layerData): if outputFormat: renderCommand += ' -F {}'.format(outputFormat) if frameRange: - # Checks if frame range is in the correct format - if re.match(r'^\d+$', frameRange): - renderCommand += ' -f {}'.format(frameRange) - elif re.match(r'^\d+-\d+$', frameRange): - startFrame, endFrame = map(int, frameRange.split("-")) - renderCommand += (' -s {startFrame} -e {endFrame} -a' - .format(startFrame=startFrame, endFrame=endFrame)) - else: - raise ValueError('Invalid frameRange format: {}'.format(frameRange)) + # Renders animation within frame range + renderCommand += (' -s {startFrame} -e {endFrame} -a' + .format(startFrame=Constants.FRAME_START, + endFrame=Constants.FRAME_END)) else: # The render frame must come after the scene and output renderCommand += ' -f {frameToken}'.format(frameToken=Constants.FRAME_TOKEN)