| 890 | } |
| 891 | |
| 892 | void |
| 893 | TrackMarker::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 | |
| 922 | void |
| 923 | TrackMarker::removeAllUserKeyframes() |
no test coverage detected