Skip to content

Commit

Permalink
Update Blender command with tokens for
Browse files Browse the repository at this point in the history
animation frame range
  • Loading branch information
n-jay committed Feb 2, 2024
1 parent 507a11a commit ce618a0
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions cuesubmit/cuesubmit/Submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ce618a0

Please sign in to comment.