keyframeCount(_:forParameter:andChannel:)
Returns the number of keyframes for a parameter’s channel.
Declaration
func keyframeCount(_ count: UnsafeMutablePointer<Int>, forParameter parameterID: Int, andChannel channelIndex: Int) -> (any Error)?Parameters
- count:
Receives the number of keyframes in the given channel.
- parameterID:
The ID of the parameter you want to get the keyframe count for.
- channelIndex:
The index of the channel within the parameter that you want to retrieve the keyframe count from.
Return Value
If any errors occur while getting the keyframe count, the return value will be a pointer to an NSError describing the problem. Otherwise, the return value is nil.
Discussion
Given a parameter, you can get the number of keyframes for any one of its channels. For a slider, toggle button (checkbox), or angle parameter, there will be only 1 channel (indexed starting at 0), whereas a point parameter will have 2 channels (x and y), and a color channel will have 4 (R, G, B, and A).
See Also
Instance Methods
add(_:toParameter:andChannel:)channelCount(_:forParameter:)keyframe(_:atOrAfter:fromParameter:andChannel:)keyframe(_:atOrBefore:fromParameter:andChannel:)keyframe(_:forParameter:channel:andIndex:)parameter(_:channel:hasKeyframe:at:)removeAllKeyframes(forParameter:andChannel:)removeKeyframe(at:fromParameter:andChannel:)setKeyframeIndex(_:with:forParameter:andChannel:)