Subjob Zip Files (#18)

* Transfer any uploaded zip files to subjobs instead of extracted zips

* Fix Blender naming scheme
This commit is contained in:
2023-06-15 19:21:10 -05:00
committed by GitHub
parent 78a51ffea0
commit 54ec5f0e9c
2 changed files with 9 additions and 7 deletions

View File

@@ -40,7 +40,8 @@ class BlenderRenderWorker(BaseRenderWorker):
if self.camera:
cmd.extend(['--python-expr', f"import bpy;bpy.context.scene.camera = bpy.data.objects['{self.camera}'];"])
cmd.extend(['-E', self.blender_engine, '-o', self.output_path, '-F', self.export_format])
path_without_ext = os.path.splitext(self.output_path)[0] + "_"
cmd.extend(['-E', self.blender_engine, '-o', path_without_ext, '-F', self.export_format])
# set frame range
cmd.extend(['-s', self.start_frame, '-e', self.end_frame, '-a'])
@@ -121,10 +122,10 @@ class BlenderRenderWorker(BaseRenderWorker):
return most_common_ext
output_dir_files = os.listdir(os.path.dirname(self.output_path))
if self.total_frames > 1 and len(output_dir_files) > 1:
if self.total_frames > 1 and len(output_dir_files) > 1 and not self.parent:
logger.info("Generating preview for image sequence")
try:
pattern = self.output_path + "%04d" + most_common_extension(output_dir_files)
pattern = os.path.splitext(self.output_path)[0] + "_%04d" + most_common_extension(output_dir_files)
image_sequence_to_video(source_glob_pattern=pattern,
output_path=self.output_path + '.mov',
framerate=self.scene_info['fps'])