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

Method goToNextKeyFrame

Engine/TrackerContext.cpp:159–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void
160TrackerContext::goToNextKeyFrame(int time)
161{
162 std::list<TrackMarkerPtr> markers;
163
164 getSelectedMarkers(&markers);
165
166 int maximum = std::numeric_limits<int>::max();
167 for (std::list<TrackMarkerPtr> ::iterator it = markers.begin(); it != markers.end(); ++it) {
168 int t = (*it)->getNextKeyframe(time);
169 if ( (t != std::numeric_limits<int>::max()) && (t < maximum) ) {
170 maximum = t;
171 }
172 }
173 if (maximum != std::numeric_limits<int>::max()) {
174 getNode()->getApp()->setLastViewerUsingTimeline( NodePtr() );
175 getNode()->getApp()->getTimeLine()->seekFrame(maximum, false, NULL, eTimelineChangeReasonPlaybackSeek);
176 }
177}
178
179TrackMarkerPtr
180TrackerContext::getMarkerByName(const std::string & name) const

Callers 1

Calls 9

maxFunction · 0.85
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