diff options
author | Yuri Sizov <yuris@humnom.net> | 2022-08-12 21:43:14 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2022-08-18 00:03:53 +0300 |
commit | 980f5f32f492ad7e55915f37a6104789d43c89e1 (patch) | |
tree | 4636e77949b93decb9c2fe2fbb950d19db2d9ab1 /doc/classes | |
parent | dbd15243621ec595742b18abc4c26f3cb2e00f3d (diff) |
Make `property_*_revert` methods multilevel and expose them for scripting
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/EditorSettings.xml | 14 | ||||
-rw-r--r-- | doc/classes/Node3D.xml | 14 | ||||
-rw-r--r-- | doc/classes/Object.xml | 16 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 14 | ||||
-rw-r--r-- | doc/classes/ShaderMaterial.xml | 14 |
5 files changed, 16 insertions, 56 deletions
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 6079cc48c8..664b5a5075 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -132,20 +132,6 @@ Marks the passed editor setting as being changed, see [method get_changed_settings]. Only settings which exist (see [method has_setting]) will be accepted. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <param index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the setting specified by [param name] can have its value reverted to the default value, [code]false[/code] otherwise. When this method returns [code]true[/code], a Revert button will display next to the setting in the Editor Settings. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <param index="0" name="name" type="String" /> - <description> - Returns the default value of the setting specified by [param name]. This is the value that would be applied when clicking the Revert button in the Editor Settings. - </description> - </method> <method name="set_builtin_action_override"> <return type="void" /> <param index="0" name="name" type="String" /> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 8a8a68ec35..e9f1f995a5 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -134,20 +134,6 @@ Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D]. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <param index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the property identified by [param name] can be reverted to a default value. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <param index="0" name="name" type="String" /> - <description> - Returns the default value of the Node3D property with given [param name]. - </description> - </method> <method name="rotate"> <return type="void" /> <param index="0" name="axis" type="Vector3" /> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index ba219d8603..3a0814a66a 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -64,6 +64,22 @@ Called whenever the object receives a notification, which is identified in [param what] by a constant. The base [Object] has two constants [constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE], but subclasses such as [Node] define a lot more notifications which are also received by this method. </description> </method> + <method name="_property_can_revert" qualifiers="virtual"> + <return type="bool" /> + <param index="0" name="property" type="StringName" /> + <description> + Virtual methods that can be overridden to customize the property revert behavior in the editor. + Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value. Override [method _property_get_revert] to return the actual value. + </description> + </method> + <method name="_property_get_revert" qualifiers="virtual"> + <return type="Variant" /> + <param index="0" name="property" type="StringName" /> + <description> + Virtual methods that can be overridden to customize the property revert behavior in the editor. + Returns the default value of the property identified by [code]name[/code]. [method _property_can_revert] must be overridden as well for this method to be called. + </description> + </method> <method name="_set" qualifiers="virtual"> <return type="bool" /> <param index="0" name="property" type="StringName" /> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 9dd41d270e..f6681fe422 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -129,20 +129,6 @@ Returns the localized path (starting with [code]res://[/code]) corresponding to the absolute, native OS [param path]. See also [method globalize_path]. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <param index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the specified property exists and its initial value differs from the current value. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <param index="0" name="name" type="String" /> - <description> - Returns the specified property's initial value. Returns [code]null[/code] if the property does not exist. - </description> - </method> <method name="save"> <return type="int" enum="Error" /> <description> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 92df3255b1..8d4df87b39 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -17,20 +17,6 @@ Returns the current value set for this material of a uniform in the shader. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <param index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the property identified by [param name] can be reverted to a default value. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <param index="0" name="name" type="String" /> - <description> - Returns the default value of the material property with given [param name]. - </description> - </method> <method name="set_shader_uniform"> <return type="void" /> <param index="0" name="param" type="StringName" /> |