mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
* Render worker makes multiple attempts if file_path increases on each run * Change blender_worker.py to not overwrite existing files * Chmod +x to client
This commit is contained in:
@@ -37,8 +37,13 @@ class BlenderRenderWorker(BaseRenderWorker):
|
||||
cmd.append('-b')
|
||||
cmd.append(self.input_path)
|
||||
|
||||
# Python expressions
|
||||
cmd.append('--python-expr')
|
||||
python_exp = 'import bpy; bpy.context.scene.render.use_overwrite = False;'
|
||||
if self.camera:
|
||||
cmd.extend(['--python-expr', f"import bpy;bpy.context.scene.camera = bpy.data.objects['{self.camera}'];"])
|
||||
python_exp = python_exp + f"bpy.context.scene.camera = bpy.data.objects['{self.camera}'];"
|
||||
# insert any other python exp checks here
|
||||
cmd.append(python_exp)
|
||||
|
||||
path_without_ext = os.path.splitext(self.output_path)[0] + "_"
|
||||
cmd.extend(['-E', self.blender_engine, '-o', path_without_ext, '-F', self.export_format])
|
||||
|
||||
Reference in New Issue
Block a user