mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-19 17:58:12 +00:00
Prevent subprocesses from constantly opening windows on Windows (#109)
* Add subprocess.CREATE_NO_WINDOW to blender_engine.py * Convert ffmpeg_engine.py to use CREATE_NO_WINDOW * Cleanup Blender implementation * Cleanup subprocesses in base_worker.py * Cleanup subprocesses in base_engine.py * Fix main.spec for Windows (optimize=2 broke it)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
logger = logging.getLogger()
|
||||
@@ -61,8 +62,9 @@ class BaseRenderEngine(object):
|
||||
path = self.renderer_path()
|
||||
if not path:
|
||||
raise FileNotFoundError("renderer path not found")
|
||||
creationflags = subprocess.CREATE_NO_WINDOW if platform.system() == 'Windows' else 0
|
||||
help_doc = subprocess.check_output([path, '-h'], stderr=subprocess.STDOUT,
|
||||
timeout=SUBPROCESS_TIMEOUT).decode('utf-8')
|
||||
timeout=SUBPROCESS_TIMEOUT, creationflags=creationflags).decode('utf-8')
|
||||
return help_doc
|
||||
|
||||
def get_project_info(self, project_path, timeout=10):
|
||||
|
||||
Reference in New Issue
Block a user