From c16d00591be623e0b1d6377e6dda7007c0e0d6c4 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Tue, 29 Aug 2017 07:15:46 +0200 Subject: DocData and type hints fixes - Makes vararg methods automatically use PROPERTY_USAGE_NIL_IS_VARIANT on return types - Completely removes the ":type" suffix for method names. Virtual methods must use the MethodInfo constructors that takes Variant::Type or PropertyHint as the first parameter for the return type (with CLASS_INFO as a helper to get the PropertyInfo). Parameters must use PROPERTY_HINT_RESOURCE_TYPE and hint string. - PROPERTY_USAGE_NIL_IS_VARIANT is no longer needed for parameters, because parameters cannot be void. - Adds missing PROPERTY_USAGE_NIL_IS_VARIANT to virtual and built-in methods that return Variant. --- editor/plugins/script_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 316c76e4b2..6d2c30d9d1 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2134,8 +2134,8 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("get_current_script"), &ScriptEditor::_get_current_script); ClassDB::bind_method(D_METHOD("get_open_scripts"), &ScriptEditor::_get_open_scripts); - ADD_SIGNAL(MethodInfo("editor_script_changed", PropertyInfo(Variant::OBJECT, "script:Script"))); - ADD_SIGNAL(MethodInfo("script_close", PropertyInfo(Variant::OBJECT, "script:Script"))); + ADD_SIGNAL(MethodInfo("editor_script_changed", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script"))); + ADD_SIGNAL(MethodInfo("script_close", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script"))); } ScriptEditor::ScriptEditor(EditorNode *p_editor) { -- cgit v1.2.3