mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Subjob Zip Files (#18)
* Transfer any uploaded zip files to subjobs instead of extracted zips * Fix Blender naming scheme
This commit is contained in:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user