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

Function getKeyTime

Engine/OfxParamInstance.cpp:143–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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