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

Method goToNextKeyFrame

Engine/TrackerContext.cpp:140–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void
141TrackerContext::goToNextKeyFrame(int time)
142{
143 std::list<TrackMarkerPtr > markers;
144
145 getSelectedMarkers(&markers);
146
147 int maximum = INT_MAX;
148 for (std::list<TrackMarkerPtr > ::iterator it = markers.begin(); it != markers.end(); ++it) {
149 int t = (*it)->getNextKeyframe(time);
150 if ( (t != INT_MAX) && (t < maximum) ) {
151 maximum = t;
152 }
153 }
154 if (maximum != INT_MAX) {
155 getNode()->getApp()->setLastViewerUsingTimeline( boost::shared_ptr<Node>() );
156 getNode()->getApp()->getTimeLine()->seekFrame(maximum, false, NULL, eTimelineChangeReasonPlaybackSeek);
157 }
158}
159
160TrackMarkerPtr
161TrackerContext::getMarkerByName(const std::string & name) const

Callers 1

Calls 8

getNextKeyframeMethod · 0.80
seekFrameMethod · 0.80
getNodeFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
getAppMethod · 0.45
getTimeLineMethod · 0.45

Tested by

no test coverage detected