I'm writing a script, that renders at some point. Currently I do it like this:
bpy.context.scene.render.filepath = os.path.join("C:/", filename)
bpy.ops.render.render(animation=False, write_still=True, use_viewport=True)
It works, but blender will not respond while rendering. I tried using a new Thread, but then I get errors like:
E0426 11:06:03.478407 13256 path_trace.cpp:648] Error beginning GPUDisplay update.
E0426 11:06:05.722097 13256 path_trace_display.cpp:61] PathTraceDisplay implementation could
not begin update.
and
Error: Render error (Permission denied) cannot save: 'C:\LS00.png'
Exception in thread Thread-2 (render_planets):
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\python\lib\threading.py", line 1016,
in _bootstrap_inner
self.run()
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\python\lib\threading.py", line 953,
in run
self._target(*self._args, **self._kwargs)
File "\Text", line 31, in render_planets
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\modules\bpy\ops.py", line
113, in __call__
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Render error (Permission denied) cannot save: 'C:\LS00.png'
Is there a way, to render like it would, when you press F12? Blender stays responsive and there is a blue progressbar in the bottom?
Thanks for your help!