mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Worker class cleanup
This commit is contained in:
@@ -6,7 +6,7 @@ SUPPORTED_FORMATS = ['TGA', 'RAWTGA', 'JPEG', 'IRIS', 'IRIZ', 'AVIRAW', 'AVIJPEG
|
||||
'OPEN_EXR', 'OPEN_EXR_MULTILAYER', 'MPEG', 'CINEON', 'DPX', 'DDS', 'JP2']
|
||||
|
||||
|
||||
class BlenderRenderWorker(RenderWorker):
|
||||
class BlenderRenderWorker(BaseRenderWorker):
|
||||
|
||||
def version(self):
|
||||
version = None
|
||||
@@ -22,14 +22,14 @@ class BlenderRenderWorker(RenderWorker):
|
||||
supported_extensions = ['.blend']
|
||||
install_paths = ['/Applications/Blender.app/Contents/MacOS/Blender']
|
||||
|
||||
def __init__(self, input_path, output_path, args=None):
|
||||
def __init__(self, input_path, output_path, args=None, render_all_frames=False, engine='BLENDER_EEVEE'):
|
||||
super(BlenderRenderWorker, self).__init__(input_path=input_path, output_path=output_path, args=args)
|
||||
|
||||
self.engine = self.args.get('engine', 'BLENDER_EEVEE')
|
||||
self.engine = engine # or 'CYCLES'
|
||||
self.format = 'JPEG'
|
||||
self.frame = 0
|
||||
|
||||
self.render_all_frames = self.args.get('render_all_frames', False)
|
||||
self.render_all_frames = render_all_frames
|
||||
|
||||
# Stats
|
||||
self.current_frame = -1
|
||||
@@ -67,7 +67,7 @@ class BlenderRenderWorker(RenderWorker):
|
||||
|
||||
sample_string = line.split('|')[-1].strip()
|
||||
if "sample" in sample_string.lower():
|
||||
samples = re.sub(r'[^\d/]', '', sample_string)
|
||||
samples = re.sub(r'[^/d/]', '', sample_string)
|
||||
self.frame_percent_complete = int(samples.split('/')[0]) / int(samples.split('/')[-1])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user