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

Method deleteAnimationConditional

Engine/Knob.cpp:3837–3878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3835}
3836
3837void
3838KnobHelper::deleteAnimationConditional(double time,
3839 ViewSpec view,
3840 int dimension,
3841 ValueChangedReasonEnum reason,
3842 bool before)
3843{
3844 if (!_imp->curves[dimension]) {
3845 return;
3846 }
3847 assert( 0 <= dimension && dimension < getDimension() );
3848
3849 CurvePtr curve;
3850 KnobGuiIPtr hasGui = getKnobGuiPointer();
3851 bool useGuiCurve = _imp->shouldUseGuiCurve();
3852
3853 if (!useGuiCurve) {
3854 curve = _imp->curves[dimension];
3855 } else {
3856 assert(hasGui);
3857 curve = hasGui->getCurve(view, dimension);
3858 setGuiCurveHasChanged(view, dimension, true);
3859 }
3860
3861 std::list<int> keysRemoved;
3862 if (before) {
3863 curve->removeKeyFramesBeforeTime(time, &keysRemoved);
3864 } else {
3865 curve->removeKeyFramesAfterTime(time, &keysRemoved);
3866 }
3867
3868 if (!useGuiCurve) {
3869 checkAnimationLevel(view, dimension);
3870 guiCurveCloneInternalCurve(eCurveChangeReasonInternal, view, dimension, reason);
3871 evaluateValueChange(dimension, time, view, reason);
3872 }
3873
3874 KnobHolder* holder = getHolder();
3875 if ( holder && holder->getApp() ) {
3876 holder->getApp()->removeMultipleKeyframeIndicator(keysRemoved, true);
3877 }
3878}
3879
3880void
3881KnobHelper::deleteAnimationBeforeTime(double time,

Callers

nothing calls this directly

Calls 7

getDimensionFunction · 0.85
shouldUseGuiCurveMethod · 0.80
getCurveMethod · 0.45
getAppMethod · 0.45

Tested by

no test coverage detected