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

Method getNKeyFramesInRange

Engine/Curve.cpp:742–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

740}
741
742int
743Curve::getNKeyFramesInRange(double first,
744 double last) const
745{
746 int ret = 0;
747 QMutexLocker k(&_imp->_lock);
748 KeyFrameSet::const_iterator upper = _imp->keyFrames.end();
749
750 for (KeyFrameSet::const_iterator it = _imp->keyFrames.begin(); it != _imp->keyFrames.end(); ++it) {
751 if (it->getTime() >= first) {
752 upper = it;
753 break;
754 }
755 }
756 for (; upper != _imp->keyFrames.end(); ++upper) {
757 if (upper->getTime() >= last) {
758 break;
759 }
760 ++ret;
761 }
762
763 return ret;
764}
765
766bool
767Curve::getKeyFrameWithTime(double time,

Callers 1

checkAnimationLevelMethod · 0.80

Calls 3

getTimeMethod · 0.80
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected