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
Tip
See the User guide: History for the user's representation of the undo and redo mechanism.