Hi all, I’m working on putting pieces of scripts together to get a more integrated Appleseed exporter/rendering interface (just for fun? Just for my own personal use? I dunno).
Rendering can be done either via command line or via the appleseed.studio GUI. Either way, I’d like to be able to update the image editor with the rendered image after rendering finishes. Hey, even WHILE it’s rendering, that would be great.
Can someone tell me how that’s done? Is there a particular function in bpy.types.RenderEngine that can be called to assist with that?
Here is a code section from the 3Delight exporter.
def update_image():
result = engine.begin_result(0, 0, engine.rpass.resolution[0], engine.rpass.resolution[1])
lay = result.layers[0]
# possible the image wont load early on.
try:
lay.load_from_file(render_output)
except:
pass
engine.end_result(result)
layers has a load_from_file method otherwise you will have to construct an array of pixels.
Mmkay, thank you. The words in that section are kind of ambiguous to me for some reason, I guess I just need to test it out and see what it does in order to make it “real” to me.