From 139c0a4afe5c1de7ada982928438650070866847 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Thu, 17 Oct 2019 12:20:35 +0200 Subject: Expose Node::update_configuration_warning() to scripts This method can be used to generate custom node warnings by script. Node::_get_configuration_warning was already exposed to generate custom warnings, but it wasn't fully usable without being able to notify the scene tree when the warning needs to appear or change. --- doc/classes/Node.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'doc/classes') diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index b206d4a4d2..1f685aab81 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -40,8 +40,9 @@ - The string returned from this method is displayed as a warning in the "Scene Dock" if the script that overrides it is a [code]tool[/code] script. + The string returned from this method is displayed as a warning in the Scene Dock if the script that overrides it is a [code]tool[/code] script. Returning an empty string produces no warning. + Call [method update_configuration_warning] when the warning needs to be updated for this node. @@ -818,6 +819,14 @@ Sets whether this is an instance load placeholder. See [InstancePlaceholder]. + + + + + Updates the warning displayed for this node in the Scene Dock. + Use [method _get_configuration_warning] to setup the warning message to display. + + -- cgit v1.2.3