Helper to manage UndoRedo in the editor or custom tools.
</brief_description>
<description>
Helper to manage UndoRedo in the editor or custom tools. It works by storing calls to functions in both 'do' an 'undo' lists.
Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<methodname="add_do_method"qualifiers="vararg">
<returntype="Variant">
</return>
<argumentindex="0"name="object"type="Object">
</argument>
<argumentindex="1"name="method"type="String">
</argument>
<description>
</description>
</method>
<methodname="add_do_property">
<returntype="void">
</return>
<argumentindex="0"name="object"type="Object">
</argument>
<argumentindex="1"name="property"type="String">
</argument>
<argumentindex="2"name="value"type="Variant">
</argument>
<description>
Set a property with a custom value.
</description>
</method>
<methodname="add_do_reference">
<returntype="void">
</return>
<argumentindex="0"name="object"type="Object">
</argument>
<description>
Add a 'do' reference 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.
</description>
</method>
<methodname="add_undo_method"qualifiers="vararg">
<returntype="Variant">
</return>
<argumentindex="0"name="object"type="Object">
</argument>
<argumentindex="1"name="method"type="String">
</argument>
<description>
</description>
</method>
<methodname="add_undo_property">
<returntype="void">
</return>
<argumentindex="0"name="object"type="Object">
</argument>
<argumentindex="1"name="property"type="String">
</argument>
<argumentindex="2"name="value"type="Variant">
</argument>
<description>
Undo setting of a property with a custom value.
</description>
</method>
<methodname="add_undo_reference">
<returntype="void">
</return>
<argumentindex="0"name="object"type="Object">
</argument>
<description>
Add an 'undo' reference 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!).
</description>
</method>
<methodname="clear_history">
<returntype="void">
</return>
<description>
Clear the undo/redo history and associated references.
</description>
</method>
<methodname="commit_action">
<returntype="void">
</return>
<description>
Commit the action. All 'do' methods/properties are called/set when this function is called.
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].