Skip to content
Snippets Groups Projects
Commit fc52d6ba authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Also log override file contents when passing to Blender for rendering

parent 5671314d
No related branches found
No related tags found
No related merge requests found
...@@ -763,13 +763,20 @@ class BlenderRenderCommand(AbstractSubprocessCommand): ...@@ -763,13 +763,20 @@ class BlenderRenderCommand(AbstractSubprocessCommand):
# No '.blend' in the filepath. Weird. # No '.blend' in the filepath. Weird.
pass pass
else: else:
override_filepath = filepath[:index] + '-overrides.py' override_filename = filepath[:index] + '-overrides.py'
if Path(override_filepath).exists(): override_filepath = Path(override_filename)
if override_filepath.exists():
msg = f'Override file found in {override_filepath}' msg = f'Override file found in {override_filepath}'
self._log.info(msg) self._log.info(msg)
await self.worker.register_log(msg) await self.worker.register_log(msg)
cmd.extend(['--python', override_filepath]) await self.worker.register_log(
f'Override file contains:\n{override_filepath.read_text("utf-8")}')
cmd.extend([
'--python-exit-code', '42',
'--python', override_filename,
])
if settings.get('python_expr'): if settings.get('python_expr'):
cmd.extend(['--python-expr', settings['python_expr']]) cmd.extend(['--python-expr', settings['python_expr']])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment