Blender is a great way to put together a presentation, and I often manually navigate through the blender file to do a presentation. But for a more formal presentation, it would be good to move through it in a specific way and not have to worry about the precision of my manual navigation. Prezi already works like this, you tell it what you want to look at on each "slide", then it seamlessly transitions through the space.
I haven't seen a lot on this, so figured I would start a thread here to talk about it.
One way to do this is by moving the camera to certain spots in the scene. It is easy to then "jump" to different "slides", using the up and down arrow key which jumps to that spot on the timeline. If you are viewing the camera, it will then switch 'slides'. To get a transition, you could play the timeline, but you would need it to STOP on the next keyframe so you have time to talk about that 'slide' before moving on.
Perhaps there is an easy way to do this, but for now, the following python code is what I came up with. It just stops the animation playback if a camera keyframe is encountered. This seems to work, but I see some extra events in there so I worry it is going to bog something down.
import bpy
# Build a set of camera keyframe frames numbers
camera_obj = bpy.context.scene.camera
camera_keyframes = set()
for fcurve in camera_obj.animation_data.action.fcurves:
if fcurve.data_path.startswith("location") or fcurve.data_path.startswith("rotation_euler"):
for keyframe in fcurve.keyframe_points:
camera_keyframes.add(round(keyframe.co.x))
print("Set of Keyframe frames= " + str(camera_keyframes))
# Define the function to stop at camera keyframes
def stop_at_camera_keyframes(scene):
print("Current Frame= " + str(scene.frame_current))
if scene.frame_current in camera_keyframes:
print("At a keyframe in set, stopping.")
bpy.ops.screen.animation_cancel(restore_frame=False)
# Register the function as a handler for the "frame_change" event
bpy.app.handlers.frame_change_pre.append(stop_at_camera_keyframes)
print("Registered Function")