summaryrefslogtreecommitdiff
path: root/doc/classes/EditorPlugin.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/EditorPlugin.xml')
-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>