summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-05-04 11:26:55 +0200
committerGitHub <noreply@github.com>2021-05-04 11:26:55 +0200
commitbee7f8ff2369debb873efd90ea3d282392c7a35b (patch)
treee0f5811cd7074bde415bcdcc6b8261f30dfb15f2 /doc/classes
parent3fea1707723a211c223f73d71b1243bf2f558d09 (diff)
parentb46672db722836182092d0972212d0c03932d430 (diff)
Merge pull request #48274 from groud/undoredo_dependencies
Allow to hook a callback into inspector's undo/redo
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/EditorPlugin.xml19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 61f1761249..f6f51df7c0 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -157,6 +157,16 @@
Registers a custom translation parser plugin for extracting translatable strings from custom files.
</description>
</method>
+ <method name="add_undo_redo_inspector_hook_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <description>
+ Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified.
+ The callback should have 4 arguments: [Object] [code]undo_redo[/code], [Object] [code]modified_object[/code], [String] [code]property[/code] and [Variant] [code]new_value[/code]. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take.
+ </description>
+ </method>
<method name="apply_changes" qualifiers="virtual">
<return type="void">
</return>
@@ -622,6 +632,15 @@
Removes a registered custom translation parser plugin.
</description>
</method>
+ <method name="remove_undo_redo_inspector_hook_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <description>
+ Removes a callback previsously added by [method add_undo_redo_inspector_hook_callback].
+ </description>
+ </method>
<method name="save_external_data" qualifiers="virtual">
<return type="void">
</return>