Check if keyframe exists for a specific pose control

Suppose I want to loop through frames and see if a keyframe exists for that pose control at frame X, is there an effective way to check for a keyframe's existance?

Comments

  • rames44rames44 Posts: 330

    It may not be the most efficient way, but...

    var numKeys = property.getNumKeys();

    for (var i = 0; i < numKeys; i++) {
        var time = property.getKeyTime(i);
        if time == theTimeYoureLookingFor {
            return true
        }
    }

    return false
     

Sign In or Register to comment.