| 138 | } |
| 139 | |
| 140 | static |
| 141 | OfxStatus |
| 142 | getKeyTime(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 | |
| 163 | static |
| 164 | OfxStatus |
no test coverage detected