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

Method goToPreviousKeyframe

Gui/GuiAppInstance.cpp:1591–1605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1589}
1590
1591void
1592GuiAppInstance::goToPreviousKeyframe()
1593{
1594 ///runs only in the main thread
1595 assert( QThread::currentThread() == qApp->thread() );
1596
1597 _imp->timelineKeyframes.sort();
1598 TimeLinePtr timeline = getProject()->getTimeLine();
1599 SequenceTime currentFrame = timeline->currentFrame();
1600 std::list<SequenceTime>::iterator lowerBound = std::lower_bound(_imp->timelineKeyframes.begin(), _imp->timelineKeyframes.end(), currentFrame);
1601 if ( lowerBound != _imp->timelineKeyframes.begin() ) {
1602 --lowerBound;
1603 timeline->seekFrame(*lowerBound, true, NULL, eTimelineChangeReasonPlaybackSeek);
1604 }
1605}
1606
1607void
1608GuiAppInstance::goToNextKeyframe()

Callers 4

keyPressEventMethod · 0.45
keyPressEventMethod · 0.45
keyPressEventMethod · 0.45

Calls 6

seekFrameMethod · 0.80
sortMethod · 0.45
getTimeLineMethod · 0.45
currentFrameMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected