MCPcopy Create free account
hub / github.com/MrKepzie/Natron / SetExpressionCommand

Method SetExpressionCommand

Gui/KnobUndoCommand.cpp:677–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675} // RestoreDefaultsCommand::redo
676
677SetExpressionCommand::SetExpressionCommand(const KnobPtr & knob,
678 bool hasRetVar,
679 int dimension,
680 const std::string& expr,
681 QUndoCommand *parent)
682 : QUndoCommand(parent)
683 , _knob(knob)
684 , _oldExprs()
685 , _hadRetVar()
686 , _newExpr(expr)
687 , _hasRetVar(hasRetVar)
688 , _dimension(dimension)
689{
690 for (int i = 0; i < knob->getDimension(); ++i) {
691 _oldExprs.push_back( knob->getExpression(i) );
692 _hadRetVar.push_back( knob->isExpressionUsingRetVariable(i) );
693 }
694}
695
696void
697SetExpressionCommand::undo()

Callers

nothing calls this directly

Calls 4

getDimensionMethod · 0.45
push_backMethod · 0.45
getExpressionMethod · 0.45

Tested by

no test coverage detected