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

Method undo

Engine/RotoUndoCommand.cpp:118–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void
119MoveControlPointsUndoCommand::undo()
120{
121 SelectedCpList::iterator cpIt = _originalPoints.begin();
122 std::set<Bezier*> beziers;
123
124 for (SelectedCpList::iterator it = _pointsToDrag.begin(); it != _pointsToDrag.end(); ++it) {
125 beziers.insert( it->first->getBezier().get() );
126 }
127
128 for (SelectedCpList::iterator it = _pointsToDrag.begin(); it != _pointsToDrag.end(); ++it, ++cpIt) {
129 it->first->clone(*cpIt->first);
130 if (it->second) {
131 it->second->clone(*cpIt->second);
132 }
133 }
134
135 for (std::set<Bezier*>::iterator it = beziers.begin(); it != beziers.end(); ++it) {
136 (*it)->incrementNodesAge();
137 }
138
139 RotoPaintInteractPtr roto = _roto.lock();
140 roto->evaluate(true);
141 roto->setCurrentTool( _selectedTool.lock() );
142 roto->setSelection(_selectedCurves, _selectedPoints);
143}
144
145void
146MoveControlPointsUndoCommand::redo()

Callers

nothing calls this directly

Calls 15

incrementNodesAgeMethod · 0.80
emptyMethod · 0.80
removeLastStrokeMethod · 0.80
isFeatherPointMethod · 0.80
setBuiltBezierMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
getMethod · 0.45
getBezierMethod · 0.45

Tested by

no test coverage detected