Animation: Added option to playblast only keyframes of selected objects

This feature makes it possible to do a viewport render (a.k.a.
playblast) by only rendering those frames on which the selected objects
have a keyframe.

The frames to render are stored in a `BLI_bitmap`, which has a bit for
each frame set to 0 (skip) or 1 (render). An alternative approach would
be to construct a set of all keyframes to render, but that would make
both constructing the list and looking up frames in the list more
complex.

The only thing this feature does is skip OpenGL rendering of a frame. As
a result, 'skipped' frames are still included in the output, but just
use the render result of the last-rendered frame. This is exactly what's
described in T72229.

Differential Revision: https://developer.blender.org/D6443

Reviewed By: zeddb

Design task: T72229
This commit is contained in:
2019-12-18 15:19:59 +01:00
parent 26e4f4a8c4
commit 7dd6e034f1
2 changed files with 105 additions and 2 deletions

View File

@@ -1115,6 +1115,12 @@ class VIEW3D_MT_view(Menu):
layout.operator("render.opengl", text="Viewport Render Image", icon='RENDER_STILL')
layout.operator("render.opengl", text="Viewport Render Animation", icon='RENDER_ANIMATION').animation = True
props = layout.operator("render.opengl",
text="Viewport Render Keyframes",
icon='RENDER_ANIMATION',
)
props.animation = True
props.render_keyed_only = True
layout.separator()