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

Method getKeyFrameTime

Engine/Knob.cpp:3664–3683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3662}
3663
3664bool
3665KnobHelper::getKeyFrameTime(ViewSpec view,
3666 int index,
3667 int dimension,
3668 double* time) const
3669{
3670 assert( 0 <= dimension && dimension < getDimension() );
3671 if ( !isAnimated(dimension, view) ) {
3672 return false;
3673 }
3674 boost::shared_ptr<Curve> curve = getCurve(view, dimension); //< getCurve will return the master's curve if any
3675 assert(curve);
3676 KeyFrame kf;
3677 bool ret = curve->getKeyFrameWithIndex(index, &kf);
3678 if (ret) {
3679 *time = kf.getTime();
3680 }
3681
3682 return ret;
3683}
3684
3685bool
3686KnobHelper::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