Undo and redo

Most functions of the SAMSON SDK that have an action on the data graph's state are undoable. When it is the case, the function documentation has a special mention: This function is undoable

Example
SBCamera* camera = SAMSON::getActiveCamera(); // get the active camera
SAMSON::beginHolding("Change camera name"); // turn the Undo system on
camera->setName("New camera name"); // change the camera name
SAMSON::endHolding(); // turn the Undo system off
SAMSON::undo(); // undo the name change

See the User guide: History for the user's representation of the undo and redo mechanism.

See also
SAMSON::isHolding()
SAMSON::beginHolding(const std::string&)
SAMSON::disableHolding()
SAMSON::enableHolding()
SAMSON::endHolding()
SAMSON::beginUndoCommandGroup(const std::string&)
SAMSON::endUndoCommandGroup()
SAMSON::addUndoCommand(SBCUndoCommand*)
SAMSON::undo()
SAMSON::redo()
SAMSON::isUndoing()
SAMSON::isRedoing()