Commit a1ad0fc6 authored by Christopher Gearhart's avatar Christopher Gearhart

fixed bug in cap on frame range length

parent 6f0b68da
......@@ -472,9 +472,7 @@ class sendAnimation(Operator):
# start render process from the defined start and end frames
elif self.state[i] == 2:
bpy.props.needsUpdating = False
self.expandedFrameRange = expandFrames(json.loads(self.frameRangesDict["string"]))
self.processes[i] = renderFrames(str(self.expandedFrameRange), self.projectName)
bpy.props.animFrameRange = self.expandedFrameRange
setRenderStatus("animation", "Rendering...")
self.state[i] += 1
return{"PASS_THROUGH"}
......@@ -529,7 +527,6 @@ class sendAnimation(Operator):
self.report({"WARNING"}, "Render in progress...")
return{"CANCELLED"}
elif scn.availableServers == 0:
self.report({"WARNING"}, "No servers available. Try refreshing.")
return{"CANCELLED"}
......@@ -537,14 +534,22 @@ class sendAnimation(Operator):
# ensure the job won't break the script
if not jobIsValid("animation", self):
return{"FINISHED"}
return{"CANCELLED"}
# initializes self.frameRangesDict (returns reports error if frame range is invalid)
if not setFrameRangesDict(self):
setRenderStatus("animation", "ERROR")
return{"FINISHED"}
return{"CANCELLED"}
# store expanded results in 'expandedFrameRange'
self.expandedFrameRange = expandFrames(json.loads(self.frameRangesDict["string"]))
# restrict length of frame range string to 50000 characters
if len(str(self.expandedFrameRange)) > 75000:
self.report({"ERROR"}, "ERROR: Frame range too large (maximum character count after conversion to ints list: 75000)")
return{"CANCELLED"}
# set the file extension for use with 'open animation' button
# set the file extension and frame range for use with 'open animation' button
bpy.props.animExtension = bpy.context.scene.render.file_extension
bpy.props.animFrameRange = self.expandedFrameRange
# start initial render process
self.stdout = None
......@@ -556,7 +561,6 @@ class sendAnimation(Operator):
self.endFrame = context.scene.frame_end
self.numFrames = str(int(scn.frame_end) - int(scn.frame_start))
self.statusChecked = False
self.expandedFrameRange = []
self.state = [1, 0] # initializes state for modal
if bpy.props.needsUpdating or bpy.props.lastServerGroup != scn.serverGroups:
bpy.props.lastServerGroup = scn.serverGroups
......
......@@ -247,10 +247,6 @@ def setFrameRangesDict(classObject):
if not classObject.frameRangesDict["valid"]:
classObject.report({"ERROR"}, "ERROR: Invalid frame ranges given.")
return False
# restrict length of frame range string to 50000 characters
if len(classObject.frameRangesDict["string"]) > 50000:
classObject.report({"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