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

Function getKeyTime

Engine/OfxParamInstance.cpp:140–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140static
141OfxStatus
142getKeyTime(const KnobIPtr& knob,
143 int nth,
144 OfxTime & time,
145 int startDim = -1,
146 int endDim = -1)
147{
148 if (nth < 0) {
149 return kOfxStatErrBadIndex;
150 }
151 OfxKeyFramesSet keyframes;
152 getOfxKeyFrames(knob.get(), keyframes, startDim, endDim);
153 if ( nth >= (int)keyframes.size() ) {
154 return kOfxStatErrBadIndex;
155 }
156 OfxKeyFramesSet::iterator it = keyframes.begin();
157 std::advance(it, nth);
158 time = *it;
159
160 return kOfxStatOK;
161}
162
163static
164OfxStatus

Callers 1

getKeyTimeMethod · 0.85

Calls 4

getOfxKeyFramesFunction · 0.85
getMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected