dope sheet

the dope sheet shows blank frames at frame 3 and 5

  • $\begingroup$ Is the question "how to display the odd numbers in the frame numbers at the bottom of the screen?" Odd numbers exist, they are just not appear on the scale. The scale for the timeline depends on the level of magnification for the window.(i.sstatic.net/6wdbM.gif ) The green cursor will display the current frame (i.sstatic.net/iAOrD.gif). $\endgroup$
    – user1853
    Commented Jun 4, 2018 at 17:59

1 Answer 1


answer based on previous question

import bpy
import math
bpy.ops.object.mode_set(mode = 'OBJECT')

# get keyframes of object list
def get_keyframes(obj_list):
    keyframes = []
    for obj in obj_list:
        anim = obj.animation_data
        if anim is not None and anim.action is not None:
            for fcu in anim.action.fcurves:
                for keyframe in fcu.keyframe_points:
                    x, y = keyframe.co
                    if x not in keyframes:
    return keyframes

def get_without_keyframes(frames):
    s = bpy.context.scene.frame_start
    e = bpy.context.scene.frame_end

    k =[]

    while s <=e:
        if s not in frames:


    return k

# get all selected objects
selection = bpy.context.selected_objects

# check if selection is not empty
if selection:

    # get all frames with assigned keyframes
    keys = get_keyframes(selection)

    # print all keyframes
    print ("WHIT: ",keys.sort())   
    print ("WHITout: ",get_without_keyframes(keys))  

    # print first and last keyframe
    print ("{} {}".format("first keyframe:", keys[0]))
    print ("{} {}".format("last keyframe:", keys[-1]))

    print ('nothing selected')

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .