|
Executes and then inverts the operation.
This function must do two things, it has to execute the current
operation, and then invert the effect of the object, so that the
next time if this function is called, it should execute the inverse
of the previous effect. Calling this function twice in a row should
result both the state of the scene and the object to be the same as
it was before the first call. Some examples of a typical
implementation of this function:
- If the task of the operation is to create an object, this
function should change the type of the operation into delete an
object, and should remember the ID of the newly created
object.
- If the task of the operation is to delete something, it should
first scan the object for all the data which is needed to properly
recreate a the object later, and change the type of the operation
to 'create'.
- If the task of the operation is to select something, the
operation type should not change during this function, but the
target of the operation should change to the object which was
selected at the time of this call. This way the next time when this
function is called, the selection will be restored into the
original object.
Reimplemented in mudbox::BrushOperation.
|