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. --- scene/main/node.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/main/node.cpp') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 7b6c90766f..217dacfbfe 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2832,6 +2832,8 @@ void Node::_bind_methods() { ClassDB::bind_method(D_METHOD("rset_unreliable", "property", "value"), &Node::rset_unreliable); ClassDB::bind_method(D_METHOD("rset_unreliable_id", "peer_id", "property", "value"), &Node::rset_unreliable_id); + ClassDB::bind_method(D_METHOD("update_configuration_warning"), &Node::update_configuration_warning); + BIND_CONSTANT(NOTIFICATION_ENTER_TREE); BIND_CONSTANT(NOTIFICATION_EXIT_TREE); BIND_CONSTANT(NOTIFICATION_MOVED_IN_PARENT); -- cgit v1.2.3