MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / getKeyFrameTime

Method getKeyFrameTime

Engine/Knob.cpp:3898–3917  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3896}
3897
3898bool
3899KnobHelper::getKeyFrameTime(ViewSpec view,
3900 int index,
3901 int dimension,
3902 double* time) const
3903{
3904 assert( 0 <= dimension && dimension < getDimension() );
3905 if ( !isAnimated(dimension, view) ) {
3906 return false;
3907 }
3908 CurvePtr curve = getCurve(view, dimension); //< getCurve will return the master's curve if any
3909 assert(curve);
3910 KeyFrame kf;
3911 bool ret = curve->getKeyFrameWithIndex(index, &kf);
3912 if (ret) {
3913 *time = kf.getTime();
3914 }
3915
3916 return ret;
3917}
3918
3919bool
3920KnobHelper::getLastKeyFrameTime(ViewSpec view,

Callers 1

getKeyTimeMethod · 0.80

Calls 3

getDimensionFunction · 0.85
getKeyFrameWithIndexMethod · 0.80
getTimeMethod · 0.80

Tested by

no test coverage detected