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

Method goToPreviousKeyFrame

Engine/TrackerContext.cpp:139–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139void
140TrackerContext::goToPreviousKeyFrame(int time)
141{
142 std::list<TrackMarkerPtr> markers;
143
144 getSelectedMarkers(&markers);
145
146 int minimum = std::numeric_limits<int>::min();
147 for (std::list<TrackMarkerPtr> ::iterator it = markers.begin(); it != markers.end(); ++it) {
148 int t = (*it)->getPreviousKeyframe(time);
149 if ( (t != std::numeric_limits<int>::min()) && (t > minimum) ) {
150 minimum = t;
151 }
152 }
153 if (minimum != std::numeric_limits<int>::min()) {
154 getNode()->getApp()->setLastViewerUsingTimeline( NodePtr() );
155 getNode()->getApp()->getTimeLine()->seekFrame(minimum, false, NULL, eTimelineChangeReasonPlaybackSeek);
156 }
157}
158
159void
160TrackerContext::goToNextKeyFrame(int time)

Callers 1

Calls 8

getPreviousKeyframeMethod · 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