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

Method goToPreviousKeyFrame

Engine/TrackerContext.cpp:120–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void
121TrackerContext::goToPreviousKeyFrame(int time)
122{
123 std::list<TrackMarkerPtr > markers;
124
125 getSelectedMarkers(&markers);
126
127 int minimum = INT_MIN;
128 for (std::list<TrackMarkerPtr > ::iterator it = markers.begin(); it != markers.end(); ++it) {
129 int t = (*it)->getPreviousKeyframe(time);
130 if ( (t != INT_MIN) && (t > minimum) ) {
131 minimum = t;
132 }
133 }
134 if (minimum != INT_MIN) {
135 getNode()->getApp()->setLastViewerUsingTimeline( boost::shared_ptr<Node>() );
136 getNode()->getApp()->getTimeLine()->seekFrame(minimum, false, NULL, eTimelineChangeReasonPlaybackSeek);
137 }
138}
139
140void
141TrackerContext::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