CodeHD wrote: ↑Mon Apr 06, 2020 8:00 pm
EDIT: for me on windows this is:
C:\Program Files\Blender Foundation\blender-2.81a-windows64
My bad, I had started Blender from the BlendLuxCore project directory on Linux, which is why the CWD (current working directory) was there for me.
Saving outputs does not work on Windows on my end because it tries to write to a directory where you need admin write permissions (i.e. the Blender installation folder).
So either you have to change the CWD before saving the outputs, or use the function Dade mentioned, which accepts a filepath (but you need to know the output type and/or name, I think).
Here's code that's more into the direction of what you want (probably):
Code: Select all
import os
from datetime import datetime
os.chdir(r"D:\my_renders")
current_dir = os.getcwd()
print("The files are in", current_dir)
engine.session.GetFilm().SaveOutputs()
date_string = datetime.now().strftime('%Y-%m-%d-%H-%M-%S')
for filename in os.listdir(current_dir):
basename, extension = os.path.splitext(filename)
if extension.lower() in {"png", "exr"}:
os.rename(filename, basename + "_" + date_string + extension)
edit: if you want the imagepipeline outputs to be exr instead of png, you can remove "RGB_IMAGEPIPELINE" and "RGBA_IMAGEPIPELINE" here:
https://github.com/LuxCoreRender/BlendL ... ovs.py#L11