| 166 | } |
| 167 | |
| 168 | void |
| 169 | TrackerNodeInteract::onTrackCurrentKeyframeClicked() |
| 170 | { |
| 171 | TrackerContextPtr ctx = getContext(); |
| 172 | SequenceTime currentFrame = _p->publicInterface->getCurrentTime(); |
| 173 | std::list<TrackMarkerPtr> selectedMarkers; |
| 174 | |
| 175 | ctx->getSelectedMarkers(&selectedMarkers); |
| 176 | |
| 177 | std::set<int> userKeys; |
| 178 | |
| 179 | for (std::list<TrackMarkerPtr>::iterator it = selectedMarkers.begin(); it != selectedMarkers.end(); ++it) { |
| 180 | std::set<int> trackUserKeys; |
| 181 | (*it)->getUserKeyframes(&trackUserKeys); |
| 182 | userKeys.insert( trackUserKeys.begin(), trackUserKeys.end() ); |
| 183 | } |
| 184 | if ( userKeys.empty() ) { |
| 185 | return; |
| 186 | } |
| 187 | |
| 188 | std::set<int>::iterator it = userKeys.lower_bound(currentFrame); |
| 189 | if ( it == userKeys.end() ) { |
| 190 | return; |
| 191 | } |
| 192 | |
| 193 | int last = *it + 1; |
| 194 | int first; |
| 195 | if ( it == userKeys.begin() ) { |
| 196 | first = *it; |
| 197 | } else { |
| 198 | --it; |
| 199 | first = *it; |
| 200 | } |
| 201 | |
| 202 | ctx->trackSelectedMarkers( first, last, 1, _p->publicInterface->getCurrentViewportForOverlays() ); |
| 203 | } |
| 204 | |
| 205 | void |
| 206 | TrackerNodeInteract::onTrackBwClicked() |
no test coverage detected