A two-level item model describing a filter's keyframeable parameters and their keyframes. More...
| Import Statement: | import org.shotcut.qml |
KeyframesModel is available as the parameters context property in the Keyframes panel. The top level contains one row per keyframeable parameter; each parameter row contains one child row per keyframe.
Passed to setInterpolation() and addKeyframe():
| Value | Name |
|---|---|
| 0 | DiscreteInterpolation |
| 1 | LinearInterpolation |
| 2 | SmoothLooseInterpolation |
| 3 | SmoothNaturalInterpolation |
| 4 | SmoothTightInterpolation |
| 5–7 | EaseInSinusoidal / EaseOutSinusoidal / EaseInOutSinusoidal |
| 8–10 | EaseIn/Out/InOutQuadratic |
| 11–13 | EaseIn/Out/InOutCubic |
| 14–16 | EaseIn/Out/InOutQuartic |
| 17–19 | EaseIn/Out/InOutQuintic |
| 20–22 | EaseIn/Out/InOutExponential |
| 23–25 | EaseIn/Out/InOutCircular |
| 26–28 | EaseIn/Out/InOutBack |
| 29–31 | EaseIn/Out/InOutElastic |
| 32–34 | EaseIn/Out/InOutBounce |
keyframeAdded(string parameter, int position) |
Emitted when a keyframe is added. parameter is the MLT property name; position is the frame number.
Note: The corresponding handler is onKeyframeAdded.
loaded() |
Emitted after the model has been populated for a new filter.
Note: The corresponding handler is onLoaded.
void addKeyframe(int parameterIndex, int position) |
Adds a keyframe at time position for parameterIndex using the current filter value.
void addKeyframe(int parameterIndex, double value, int position, int type) |
Adds a keyframe at time position for parameterIndex with numeric value and interpolation type.
bool advancedKeyframesInUse() |
Returns true if the filter is currently using advanced (per-keyframe) interpolation.
bool isKeyframe(int parameterIndex, int position) |
Returns true if a keyframe exists at time position for parameterIndex.
int keyframeIndex(int parameterIndex, int currentPosition) |
Returns the keyframe index at time currentPosition for the given parameterIndex, or -1 if no keyframe exists at that position.
int parameterIndex(string propertyName) |
Returns the row index of the parameter identified by propertyName, or -1.
void reload() |
Reloads the model from the current filter, refreshing all parameter and keyframe rows.
bool remove(int parameterIndex, int keyframeIndex) |
Removes the keyframe at keyframeIndex on parameter parameterIndex. Returns true on success.
void removeAdvancedKeyframes() |
Converts all advanced keyframes to simple (linear) keyframes.
void removeSimpleKeyframes() |
Removes the simple keyframe animation, returning the filter to a static state.
bool setInterpolation(int parameterIndex, int keyframeIndex, int type) |
Sets the interpolation type for the keyframe at keyframeIndex on parameterIndex. type is a value from the InterpolationType enum. Returns true on success.
void setKeyframePosition(int parameterIndex, int keyframeIndex, int position) |
Moves the keyframe at keyframeIndex on parameterIndex to position (in frames).
void setKeyframeValue(int parameterIndex, int keyframeIndex, double value) |
Sets the numeric value of an existing keyframe on parameter parameterIndex at keyframeIndex.
void setKeyframeValuePosition(int parameterIndex, int keyframeIndex, double value, int position) |
Sets both the value and time position of keyframe keyframeIndex on parameter parameterIndex in one operation.
bool simpleKeyframesInUse() |
Returns true if the filter is currently using simple (two-keyframe) animation.