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

Method removeKeyframe

Engine/Bezier.cpp:2401–2435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2399}
2400
2401void
2402Bezier::removeKeyframe(double time)
2403{
2404 ///only called on the main-thread
2405 assert( QThread::currentThread() == qApp->thread() );
2406 {
2407 QMutexLocker l(&itemMutex);
2408
2409 if ( !_imp->hasKeyframeAtTime(false, time) ) {
2410 return;
2411 }
2412 assert( _imp->featherPoints.size() == _imp->points.size() || !useFeatherPoints() );
2413
2414 bool useFeather = useFeatherPoints();
2415 BezierCPs::iterator fp = _imp->featherPoints.begin();
2416 for (BezierCPs::iterator it = _imp->points.begin(); it != _imp->points.end(); ++it) {
2417 (*it)->removeKeyframe(false, time);
2418 if (useFeather) {
2419 (*fp)->removeKeyframe(false, time);
2420 ++fp;
2421 }
2422 }
2423
2424 std::map<double, bool>::iterator found = _imp->isClockwiseOriented.find(time);
2425 if ( found != _imp->isClockwiseOriented.end() ) {
2426 _imp->isClockwiseOriented.erase(found);
2427 }
2428
2429 copyInternalPointsToGuiPoints();
2430 }
2431
2432 incrementNodesAge();
2433 getContext()->evaluateChange();
2434 Q_EMIT keyframeRemoved(time);
2435}
2436
2437void
2438Bezier::removeAnimation()

Callers 5

knobChangedMethod · 0.45
moveKeyframeMethod · 0.45
addOrRemoveKeyframeMethod · 0.45

Calls 7

hasKeyframeAtTimeMethod · 0.80
evaluateChangeMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected