1
$\begingroup$

I want to skip the animation between keyframes 100 - 200. So once playback reaches keyframe 100 it jumps straight to keyframe 200.

$\endgroup$
1
  • $\begingroup$ One simple way is to select keyframes in between keyframes 100 - 200, delete them, select those where you'd like playback to jump to and grab them towards the beginning. Note that original keyframes 100-200 will be lost $\endgroup$ – Mr Zak Jan 24 '16 at 14:11
1
$\begingroup$

If you're just making a video, add the scene of the animation into the blender VSE and cut out the 101-199 frame range of that animation strip. This will allow you to preview and render your animation without those frames. Additionally, the keyframes will not be affected. If you eventually wish to go back and include the frames again, they will still exist.

Alternatively, you could do as Mr Zak suggested and move all the keyframes from the 200th frame and onward back 99 frames. This would make animation appear as though it is skipping all the frames in the 101-199 range.

To do that, go to drop down menu of blender layouts found in the top left and select the animation layout.

enter image description here

In the dope sheet editor found in the top left, check to see if there are any keyframes in the 101-199 frame range. If there are any, delete them. The range should be made empty.

After the frame range is clear,

  • Set the vertical bar at the 200th frame and press ] to select all the keyframes to the right of the vertical bar.

  • Press G to grab your selection, type -99 to move the keyframes back 99 frames and press enter.

The keyframes that were at the 200th frame mark should now be at the 101th frame. Now when you cycle from the 100th frame to the next frame, it should act as though you were cycling straight to the 200th frame.

$\endgroup$
1
1
$\begingroup$

You can install a handler for frame_change_pre that alters the current frame if the frame is within a range. This will make playback in the 3DView always skip frames 101-199

import bpy

def my_frameskipper(scene):
    if scene.frame_current > 100 and scene.frame_current < 200:
        scene.frame_set(200)

bpy.app.handlers.frame_change_pre.append(my_frameskipper)

# remove the handler with -
# bpy.app.handlers.frame_change_pre.remove(my_frameskipper)

While that is fine for 3DView playback it breaks rendering an animation. To render a range of frames you can use -

import bpy

scn = bpy.context.scene
basepath = '//renders/'

for f in range(scn.frame_start, scn.frame_end+1):
    if f <= 100 or f >= 200:
        scn.frame_set(f)
        scn.render.filepath = basepath + str(f)
        bpy.ops.render.render(write_still=True)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.