[method create_action], [method add_do_method], [method add_undo_method], [method add_do_property], [method add_undo_property], and [method commit_action] should be called one after the other, like in the example. Not doing so could lead to crashes.
If you don't need to register a method, you can leave [method add_do_method] and [method add_undo_method] out; the same goes for properties. You can also register more than one method/property.
</description>
<tutorials>
</tutorials>
<methods>
<methodname="add_do_method"qualifiers="vararg">
<returntype="void"/>
<argumentindex="0"name="object"type="Object"/>
<argumentindex="1"name="method"type="String"/>
<description>
Register a method that will be called when the action is committed.
Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources.
Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!).
Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].
The way actions are merged is dictated by the [code]merge_mode[/code] argument. See [enum MergeMode] for details.
Returns [code]true[/code] if the [UndoRedo] is currently committing the action, i.e. running its "do" method or property change (see [method commit_action]).
</description>
</method>
<methodname="redo">
<returntype="bool"/>
<description>
Redo the last action.
</description>
</method>
<methodname="undo">
<returntype="bool"/>
<description>
Undo the last action.
</description>
</method>
</methods>
<signals>
<signalname="version_changed">
<description>
Called when [method undo] or [method redo] was called.
Makes so that the action's "do" operation is from the first action created and the "undo" operation is from the last subsequent action with the same name.