-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Viewport Render Animation breaks {serial} tag #7
Comments
Hey @Alumx! Blender does not invoke the render_init and render_complete handlers when rendering the viewport. Short answer; from what I can tell, it's simply not possible to write a plugin that works natively with the render.opengl operator, only the render.render operator. However, there may be some workarounds.
If you manually sequence the existing plugin functions with a python call to the render.opengl operator, it should behave enough like the Blender handler system to work. Blender will freeze during the entire operation, just like when triggering a standard render from the Python API. You'd also need to set up a script for each of the three viewport rendering options (image, animation, and keyframes). import bpy
import VF_autosaveRender
VF_autosaveRender.autosave_render_start(bpy.context.scene)
bpy.ops.render.opengl(animation=True)
VF_autosaveRender.autosave_render(bpy.context.scene)
If you're only capturing camera viewpoints and just need a quick Workbench render shortcut, VF-BlenderProxyRender might do the trick. It uses the standard rendering system in Blender, but temporarily sets the engine to Workbench along with a few other settings, and works correctly with other plugins like VR_autosaveRender that depend on event handlers. As mentioned above, the Blender interface will freeze while rendering, but generally it's pretty fast (so long as your Workbench settings aren't crazy). |
As of Blender 2.7.3, the Updated script to render a viewport image: import bpy
import VF_autosaveRender
VF_autosaveRender.autosave_render_start(bpy.context.scene)
bpy.ops.render.opengl()
VF_autosaveRender.autosave_render_end(bpy.context.scene) To render an animation: Triggering a render from Python will freeze Blender as it waits for the operation to complete; the Python API is not thread-safe and I haven't found a way around this limitation. |
Closing: Blender API limitation |
If you set Output to "//Output\test {serial}/" and render Viewport Animation, it'll fail to create a folder with appropriate number
Also Is it possible to auto-save viewport renders too?
The text was updated successfully, but these errors were encountered: