Commit 85ba7d39 authored by bblanimation's avatar bblanimation

Added remote performance parameters, bug fix

parent 2ab70be6
......@@ -118,6 +118,27 @@ def register():
min=100, max=9999,
default=1000)
bpy.types.Scene.renderDevice = EnumProperty(
name="Device",
description="Device to use for remote rendering",
items=[("GPU", "GPU Compute", "Use GPU compute device for remote rendering"),
("CPU", "CPU", "Use CPU for remote rendering")],
default="CPU")
bpy.types.Scene.renderTiles = IntVectorProperty(
name="Render Tiles",
description="Tile size to use for remote rendering",
size=2,
subtype="XYZ",
default=[32, 32])
bpy.types.Scene.cyclesComputeDevice = EnumProperty(
name="Cycles Compute Device",
description="Cycles compute device for remote rendering",
items=[("DEFAULT", "Default", "Use default compute device on remote server"),
("NONE", "None", "Don't use compute device"),
("CUDA", "CUDA", "Use CUDA for remote rendering if available"),
("OPENCL", "OpenCL", "Use OpenCL for remote rendering if available")],
default="DEFAULT")
bpy.types.Scene.imagePreviewAvailable = BoolProperty(default=False)
bpy.types.Scene.animPreviewAvailable = BoolProperty(default=False)
bpy.types.Scene.imageRenderStatus = StringProperty(name="Image Render Status", default="None")
......
......@@ -93,5 +93,6 @@ class openRenderedAnimationInUI(Operator):
return{"CANCELLED"}
def __init__(self):
self.frameRangesDict = buildFrameRangesString(context.scene.frameRanges)
scn = bpy.context.scene
self.frameRangesDict = buildFrameRangesString(scn.frameRanges)
self.renderDumpFolder = getRenderDumpPath()[0]
......@@ -47,12 +47,6 @@ def jobIsValid(jobType, classObject):
if not jobValidityDict and scn.render.image_settings.file_format in unsupportedFormats:
jobValidityDict = {"valid":False, "errorType":"WARNING", "errorMessage":"RENDER FAILED: Output file format not supported. Supported formats: BMP, PNG, TARGA, JPEG, JPEG 2000, TIFF. (Animation only: IRIS, CINEON, HDR, DPX, OPEN_EXR, OPEN_EXR_MULTILAYER)"}
# verify that sampling is high enough to provide expected results
if jobType == "image" and scn.render.engine == "CYCLES":
jobsPerFrame = scn.maxSamples // scn.samplesPerFrame
if jobsPerFrame > 100:
jobValidityDict = {"valid":False, "errorType":"WARNING", "errorMessage": "Max Samples / SamplesPerJob > 100. Try increasing samples per frame or lowering max samples."}
# verify that the user input for renderDumpLoc is valid and can be created
rdf, errorMsg = getRenderDumpPath()
if errorMsg is not None:
......
......@@ -79,8 +79,7 @@ matt
{'cse217': [
"cse21701","cse21702","cse21703","cse21704","cse21705","cse21706",
"cse21707","cse21709","cse21710","cse21712",
"cse21713","cse21714","cse21715","cse21716"
],'cse218': [
"cse21713","cse21714","cse21715","cse21716",
"cse21801","cse21802", "cse21803","cse21804","cse21805","cse21806",
"cse21807","cse21808","cse21809","cse21811","cse21812",
"cse21814"
......@@ -100,6 +99,11 @@ matt
### NOTES (everything below this line will be ignored) ###
],'cse218': [
1: 4-6.5
2: 6.5-10
......
......@@ -61,11 +61,20 @@ bpy.app.handlers.frame_change_pre.append(handle_bricker_animation)
""" END SUPPORT FOR BRICKER """
randomSeed = random.randint(1, 10000)
for scene in bpy.data.scenes:
scene.cycles.seed = randomSeed
scene.cycles.transparent_min_bounces = 0
scene.cycles.min_bounces = 0
scene.cycles.blur_glossy = 0
scene.render.use_overwrite = True
if scene.cycles.film_transparent:
scene.render.image_settings.color_mode = 'RGBA'
for scn in bpy.data.scenes:
scn.cycles.seed = randomSeed
scn.cycles.transparent_min_bounces = 0
scn.cycles.min_bounces = 0
scn.cycles.blur_glossy = 0
scn.render.use_overwrite = True
if scn.cycles.film_transparent:
scn.render.image_settings.color_mode = 'RGBA'
# apply performance settings
scn.cycles.device = scn.renderDevice
scn.render.tile_x = scn.renderTiles[0]
scn.render.tile_y = scn.renderTiles[1]
typ = scn.cyclesComputeDevice
cyclesPrefs = bpy.context.user_preferences.addons['cycles'].preferences
devices = [x[0] for x in cyclesPrefs.get_device_types(bpy.context)]
if typ >= "DEFAULT":
cyclesPrefs.compute_device_type = typ if typ in devices else "NONE"
......@@ -144,7 +144,7 @@ class serversPanel(Panel):
layout.separator()
col = box.column(align=True)
col.label(text="Performance:")
col.label(text="Distribution:")
col.prop(scn, "maxServerLoad")
col.prop(scn, "timeout")
if scn.render.engine == "CYCLES":
......@@ -159,3 +159,15 @@ class serversPanel(Panel):
# The following is probably unnecessary
# col = box.row(align=True)
# col.prop(scn, "tempLocalDir")
layout.separator()
col = box.column(align=True)
row = col.row()
col = row.column(align=True)
col.label(text="Device:")
col.prop(scn, "renderDevice", text="")
col.prop(scn, "cyclesComputeDevice", text="")
col = row.column(align=True)
col.label(text="Tiles:")
col.prop(scn, "renderTiles", text="")
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