mirror of
https://github.com/blw1138/Zordon.git
synced 2026-02-05 13:46:10 +00:00
@@ -35,7 +35,7 @@ class Blender(BaseRenderEngine):
|
||||
def version(self):
|
||||
version = None
|
||||
try:
|
||||
render_path = self.renderer_path()
|
||||
render_path = self.engine_path()
|
||||
if render_path:
|
||||
ver_out = subprocess.check_output([render_path, '-v'], timeout=SUBPROCESS_TIMEOUT,
|
||||
creationflags=_creationflags)
|
||||
@@ -52,7 +52,7 @@ class Blender(BaseRenderEngine):
|
||||
def run_python_expression(self, project_path, python_expression, timeout=None):
|
||||
if os.path.exists(project_path):
|
||||
try:
|
||||
return subprocess.run([self.renderer_path(), '-b', project_path, '--python-expr', python_expression],
|
||||
return subprocess.run([self.engine_path(), '-b', project_path, '--python-expr', python_expression],
|
||||
capture_output=True, timeout=timeout, creationflags=_creationflags)
|
||||
except Exception as e:
|
||||
err_msg = f"Error running python expression in blender: {e}"
|
||||
@@ -69,7 +69,7 @@ class Blender(BaseRenderEngine):
|
||||
raise FileNotFoundError(f'Python script not found: {script_path}')
|
||||
|
||||
try:
|
||||
command = [self.renderer_path(), '-b', '--python', script_path]
|
||||
command = [self.engine_path(), '-b', '--python', script_path]
|
||||
if project_path:
|
||||
command.insert(2, project_path)
|
||||
result = subprocess.run(command, capture_output=True, timeout=timeout, creationflags=_creationflags)
|
||||
@@ -132,7 +132,7 @@ class Blender(BaseRenderEngine):
|
||||
return None
|
||||
|
||||
def get_arguments(self):
|
||||
help_text = subprocess.check_output([self.renderer_path(), '-h'], creationflags=_creationflags).decode('utf-8')
|
||||
help_text = subprocess.check_output([self.engine_path(), '-h'], creationflags=_creationflags).decode('utf-8')
|
||||
lines = help_text.splitlines()
|
||||
|
||||
options = {}
|
||||
@@ -179,7 +179,7 @@ class Blender(BaseRenderEngine):
|
||||
logger.error("GPU data not found in the output.")
|
||||
|
||||
def supported_render_engines(self):
|
||||
engine_output = subprocess.run([self.renderer_path(), '-E', 'help'], timeout=SUBPROCESS_TIMEOUT,
|
||||
engine_output = subprocess.run([self.engine_path(), '-E', 'help'], timeout=SUBPROCESS_TIMEOUT,
|
||||
capture_output=True, creationflags=_creationflags).stdout.decode('utf-8').strip()
|
||||
render_engines = [x.strip() for x in engine_output.split('Blender Engine Listing:')[-1].strip().splitlines()]
|
||||
return render_engines
|
||||
|
||||
Reference in New Issue
Block a user