mirror of
https://github.com/blw1138/Zordon.git
synced 2026-02-05 13:46:10 +00:00
Send resolution / fps data in job submission
This commit is contained in:
@@ -40,10 +40,16 @@ class BlenderRenderWorker(BaseRenderWorker):
|
||||
cmd.append('--python-expr')
|
||||
python_exp = 'import bpy; bpy.context.scene.render.use_overwrite = False;'
|
||||
|
||||
# Setup Custom Resolution
|
||||
if self.args.get('resolution'):
|
||||
res = self.args.get('resolution')
|
||||
python_exp += 'bpy.context.scene.render.resolution_percentage = 100;'
|
||||
python_exp += f'bpy.context.scene.render.resolution_x={res[0]}; bpy.context.scene.render.resolution_y={res[1]};'
|
||||
|
||||
# Setup Custom Camera
|
||||
custom_camera = self.args.get('camera', None)
|
||||
if custom_camera:
|
||||
python_exp = python_exp + f"bpy.context.scene.camera = bpy.data.objects['{custom_camera}'];"
|
||||
python_exp += f"bpy.context.scene.camera = bpy.data.objects['{custom_camera}'];"
|
||||
|
||||
# Set Render Device for Cycles (gpu/cpu/any)
|
||||
if blender_engine == 'CYCLES':
|
||||
|
||||
Reference in New Issue
Block a user