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

Method resetTrack

Engine/TrackMarker.cpp:892–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890}
891
892void
893TrackMarker::resetTrack()
894{
895 Point curCenter;
896 KnobDoublePtr knob = getCenterKnob();
897
898 curCenter.x = knob->getValue(0);
899 curCenter.y = knob->getValue(1);
900
901 EffectInstancePtr effect = getContext()->getNode()->getEffectInstance();
902 effect->beginChanges();
903
904 const KnobsVec& knobs = getKnobs();
905 for (KnobsVec::const_iterator it = knobs.begin(); it != knobs.end(); ++it) {
906 if (*it != knob) {
907 for (int i = 0; i < (*it)->getDimension(); ++i) {
908 (*it)->resetToDefaultValue(i);
909 }
910 } else {
911 for (int i = 0; i < (*it)->getDimension(); ++i) {
912 (*it)->removeAnimation(ViewSpec::current(), i);
913 }
914 knob->setValue(curCenter.x, ViewSpec::current(), 0);
915 knob->setValue(curCenter.y, ViewSpec::current(), 1);
916 }
917 }
918 effect->endChanges();
919 removeAllUserKeyframes();
920}
921
922void
923TrackMarker::removeAllUserKeyframes()

Callers 3

resetMethod · 0.80
onResetButtonClickedMethod · 0.80

Calls 12

currentFunction · 0.85
getEffectInstanceMethod · 0.80
resetToDefaultValueMethod · 0.80
getValueMethod · 0.45
getNodeMethod · 0.45
beginChangesMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getDimensionMethod · 0.45
removeAnimationMethod · 0.45
setValueMethod · 0.45
endChangesMethod · 0.45

Tested by

no test coverage detected