BlendLuxCore: Save image while render is paused
BlendLuxCore: Save image while render is paused
BYOB please can you help me ? I want to know if blender api allow to save a render while being in pause ?
Re: BlendLuxCore Development
Blender API probably not, but LuxCore allows it.
However, it will lack Blender's color management (filmic etc.) and compositing.
However, it will lack Blender's color management (filmic etc.) and compositing.
Re: BlendLuxCore Development
You mean image will be saved as Exr. So we can just reload them automatically and save to jpg so they get the ajustment applied.
But anyway step by step. Can we have the first stage of save while rendering.
Re: BlendLuxCore Development
After this line, you can insert
Code: Select all
engine.session.GetFilm().SaveOutputs()
Re: BlendLuxCore: Save image while render is paused
Thank you so much
What if i want it to be the blendfile folder to be the automatic output ?
I hope the file will not be rewrite each time i hit pause. So i can keep each image file.
What if i want it to be the blendfile folder to be the automatic output ?
I hope the file will not be rewrite each time i hit pause. So i can keep each image file.
Re: BlendLuxCore: Save image while render is paused
I'm not sure if the LuxCore API offers a way to pass a filepath to SaveOutputs(), this is a question for Dade.
You have to rename the images or move them somewhere else if you want to prevent them from being overwritten.
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
Re: BlendLuxCore: Save image while render is paused
I guess you could probably do something like:You have to rename the images or move them somewhere else if you want to prevent them from being overwritten.
Code: Select all
import os
from datetime import datetime
os.rename('a.exr', '{}.exr'.format(datetime.now().strftime('%Y-%m-%d-%H-%M-%S')
You may also want to put the absolute path instead of the relative
Re: BlendLuxCore: Save image while render is paused
There is the "SaveOutput()" for that but Alpistinho's solution is simpler.
Re: BlendLuxCore: Save image while render is paused
The first code line by BYOB seem to not give me any result. there is no file saved and i have to search in all folder as i don't know wich exact folder get the file. but a quick search "exr" inside addon folder show nothing.
Alpistinho can you upload you're working modified final.py file so i can overwritte mine and be sure instruction are the same ?
I'm a bit overhelming.
Alpistinho can you upload you're working modified final.py file so i can overwritte mine and be sure instruction are the same ?
I'm a bit overhelming.
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
Re: BlendLuxCore: Save image while render is paused
I hadn't even seen the code before, but I came up with that:Sharlybg wrote: ↑Mon Apr 06, 2020 7:45 pm The first code line by BYOB seem to not give me any result. there is no file saved and i have to search in all folder as i don't know wich exact folder get the file. but a quick search "exr" inside addon folder show nothing.
Alpistinho can you upload you're working modified final.py file so i can overwritte mine and be sure instruction are the same ?
I'm a bit overhelming.
Code: Select all
if LuxCoreDisplaySettings.paused:
if not engine.session.IsInPause():
engine.session.Pause()
utils_render.update_status_msg(stats, engine, depsgraph.scene, config, time_until_film_refresh=0)
engine.framebuffer.draw(engine, engine.session, depsgraph.scene, render_stopped=False)
engine.update_stats("", "Paused")
# Our crappy patch here
engine.session.GetFilm().SaveOutputs()
import os
from datetime import datetime
os.rename('a.exr', '{}.exr'.format(datetime.now().strftime('%Y-%m-%d-%H-%M-%S')))