Commit afb1edeb authored by bblanimation's avatar bblanimation

More bug fixes

parent 2cec2a76
......@@ -140,7 +140,7 @@ def register():
bpy.props.serverPrefs = {"servers":None, "login":None, "path":None, "hostConnection":None}
bpy.types.Scene.availableServers = IntProperty(name="Available Servers", default=0)
bpy.types.Scene.offlineServers = IntProperty(name="Offline Servers", default=0)
bpy.types.Scene.needsUpdating = BoolProperty(default=True)
bpy.props.needsUpdating = BoolProperty(default=True)
bpy.types.Scene.nameAveragedImage = StringProperty(default="")
bpy.types.Scene.nameImOutputFiles = StringProperty(default="")
......@@ -184,8 +184,8 @@ def unregister():
del bpy.props.serverPrefs
del Scn.offlineServers
del Scn.availableServers
del Scn.needsUpdating
del Scn.lastServerGroup
del bpy.props.needsUpdating
del bpy.props.lastServerGroup
del Scn.serverGroups
del Scn.animRenderStatus
del Scn.imageRenderStatus
......
......@@ -46,7 +46,7 @@ class editRemoteServersDict(Operator):
libraryServersPath = os.path.join(getLibraryPath(), "servers")
bpy.ops.text.open(filepath=os.path.join(libraryServersPath, "remoteServers.txt"))
self.report({"INFO"}, "Opened 'remoteServers.txt'")
scn.needsUpdating = True
bpy.props.needsUpdating = True
except:
self.report({"ERROR"}, "ERROR: Could not open 'remoteServers.txt'. If the problem persists, try reinstalling the add-on.")
return{"FINISHED"}
......@@ -110,7 +110,7 @@ class refreshServers(Operator):
# check number of available servers via host server
if self.state == 1:
scn.needsUpdating = False
bpy.props.needsUpdating = False
self.state += 1
self.process = self.checkNumAvailServers()
return{"PASS_THROUGH"}
......@@ -132,8 +132,8 @@ class refreshServers(Operator):
@classmethod
def refreshServersBlock(cls, statusType=None):
scn = bpy.context.scene
if scn.needsUpdating or scn.lastServerGroup != scn.serverGroups:
scn.lastServerGroup = scn.serverGroups
if bpy.props.needsUpdating or bpy.props.lastServerGroup != scn.serverGroups:
bpy.props.lastServerGroup = scn.serverGroups
updateStatus = updateServerPrefs()
if not updateStatus["valid"]:
return False
......@@ -150,7 +150,7 @@ class refreshServers(Operator):
return False
cls.updateAvailServerInfo(process)
scn.needsUpdating = False
bpy.props.needsUpdating = False
return True
def execute(self, context):
......@@ -160,8 +160,8 @@ class refreshServers(Operator):
# start initial process
self.state = 1 # initializes state for modal
if scn.needsUpdating or scn.lastServerGroup != scn.serverGroups:
scn.lastServerGroup = scn.serverGroups
if bpy.props.needsUpdating or bpy.props.lastServerGroup != scn.serverGroups:
bpy.props.lastServerGroup = scn.serverGroups
updateStatus = updateServerPrefs()
if not updateStatus["valid"]:
self.report({"ERROR"}, updateStatus["errorMessage"])
......
......@@ -50,7 +50,7 @@ class reportError(bpy.types.Operator):
bpy.ops.text.open(filepath=os.path.join(libraryServersPath, "Render_Farm_error_report.txt"))
bpy.context.space_data.show_word_wrap = True
self.report({"INFO"}, "Opened 'Render_Farm_error_report.txt'")
scn.needsUpdating = True
bpy.props.needsUpdating = True
except:
self.report({"ERROR"}, "ERROR: Could not open 'Render_Farm_error_report.txt'. If the problem persists, try reinstalling the add-on.")
except:
......
......@@ -138,7 +138,7 @@ class sendAnimation(Operator):
# start render process from the defined start and end frames
elif self.state[i] == 2:
scn.needsUpdating = False
bpy.props.needsUpdating = False
self.processes[i] = renderFrames(str(self.expandedFrameRange), self.projectName)
setRenderStatus("animation", "Rendering...")
self.state[i] += 1
......@@ -234,8 +234,8 @@ class sendAnimation(Operator):
self.numFrames = str(int(scn.frame_end) - int(scn.frame_start))
self.statusChecked = False
self.state = [1, 0] # initializes state for modal
if scn.needsUpdating or scn.lastServerGroup != scn.serverGroups:
scn.lastServerGroup = scn.serverGroups
if bpy.props.needsUpdating or bpy.props.lastServerGroup != scn.serverGroups:
bpy.props.lastServerGroup = scn.serverGroups
updateStatus = updateServerPrefs()
if not updateStatus["valid"]:
self.report({"ERROR"}, updateStatus["errorMessage"])
......
......@@ -138,7 +138,7 @@ class sendFrame(Operator):
# start render process at current frame
elif self.state[i] == 2:
scn.needsUpdating = False
bpy.props.needsUpdating = False
jobsPerFrame = scn.maxSamples // self.sampleSize
self.processes[i] = renderFrames(str([scn.imFrame]), self.projectName, jobsPerFrame)
self.state[i] += 1
......@@ -172,7 +172,6 @@ class sendFrame(Operator):
self.numSamples = self.sampleSize * self.avDict["numFrames"]
if i == 0:
setRenderStatus("image", "Complete!")
print(scn.nameAveragedImage)
if bpy.data.images.find(scn.nameAveragedImage) >= 0:
# open rendered image in any open 'IMAGE_EDITOR' windows
for area in context.screen.areas:
......@@ -197,7 +196,6 @@ class sendFrame(Operator):
previewString = "Render preview loaded ({num} samples)".format(num=str(self.numSamples))
self.report({"INFO"}, previewString)
scn.imagePreviewAvailable = True
scn.animPreviewAvailable = False
if i == 0:
if self.renderCancelled:
setRenderStatus("image", "Cancelled")
......@@ -265,11 +263,10 @@ class sendFrame(Operator):
self.numSamples = 0
self.avDict = {"array":False, "numFrames":0}
self.averageIm = None
scn.nameImOutputFiles = getNameOutputFiles()
scn.imFrame = scn.frame_current
self.state = [1, 0] # initializes state for modal
if scn.needsUpdating or scn.lastServerGroup != scn.serverGroups:
scn.lastServerGroup = scn.serverGroups
if bpy.props.needsUpdating or bpy.props.lastServerGroup != scn.serverGroups:
bpy.props.lastServerGroup = scn.serverGroups
updateStatus = updateServerPrefs()
if not updateStatus["valid"]:
self.report({"ERROR"}, updateStatus["errorMessage"])
......@@ -277,6 +274,7 @@ class sendFrame(Operator):
else:
self.state[0] += 1
self.processes = [copyProjectFile(self.projectName, scn.compress), False]
scn.nameImOutputFiles = getNameOutputFiles()
# create timer for modal
wm = context.window_manager
......
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