Commit 3aa606c5 authored by Christopher Gearhart's avatar Christopher Gearhart

Restricted character length on frame range, which is now verified before render process begins.

parent 2c2de5e9
......@@ -472,10 +472,6 @@ class sendAnimation(Operator):
# start render process from the defined start and end frames
elif self.state[i] == 2:
bpy.props.needsUpdating = False
# initializes self.frameRangesDict (returns False if frame range invalid)
if not setFrameRangesDict(self):
setRenderStatus("animation", "ERROR")
self.expandedFrameRange = expandFrames(json.loads(self.frameRangesDict["string"]))
self.processes[i] = renderFrames(str(self.expandedFrameRange), self.projectName)
bpy.props.animFrameRange = self.expandedFrameRange
......@@ -542,6 +538,10 @@ class sendAnimation(Operator):
# ensure the job won't break the script
if not jobIsValid("animation", self):
# initializes self.frameRangesDict (returns reports error if frame range is invalid)
if not setFrameRangesDict(self):
setRenderStatus("animation", "ERROR")
# set the file extension for use with 'open animation' button
bpy.props.animExtension = bpy.context.scene.render.file_extension
......@@ -247,6 +247,10 @@ def setFrameRangesDict(classObject):
if not classObject.frameRangesDict["valid"]:{"ERROR"}, "ERROR: Invalid frame ranges given.")
return False
# restrict length of frame range string to 50000 characters
if len(classObject.frameRangesDict["string"]) > 50000:{"ERROR"}, "ERROR: Frame range is too large.")
return False
return True
def getRenderDumpFolder():
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment