| 141 | } |
| 142 | |
| 143 | static |
| 144 | OfxStatus |
| 145 | getKeyTime(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 | |
| 166 | static |
| 167 | OfxStatus |
no test coverage detected