From d0e45e78a48fc0cc61b118a51020eef202998242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 27 Sep 2019 22:16:32 +0200 Subject: [PATCH] doc: Sync classref with current source And various fixes to bindings, hyperlinks and an uninitialized variable. --- doc/classes/Crypto.xml | 2 +- doc/classes/CryptoKey.xml | 2 +- doc/classes/Font.xml | 2 +- doc/classes/Skeleton.xml | 19 +++++++++++ doc/classes/TreeItem.xml | 4 ++- doc/classes/X509Certificate.xml | 2 +- modules/visual_script/config.py | 2 ++ .../doc_classes/VisualScriptLists.xml | 32 +++++++++---------- modules/visual_script/visual_script_nodes.cpp | 16 +++++----- scene/gui/rich_text_effect.cpp | 1 + scene/gui/tree.cpp | 2 +- scene/resources/font.cpp | 2 +- 12 files changed, 55 insertions(+), 31 deletions(-) diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index 4ec405f96ce..bce78959739 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -41,7 +41,7 @@ - Generates an RSA [CryptoKey] that can be used for creating self-signed certificates and passed to [method StreamPeerSSL.acccept_stream]. + Generates an RSA [CryptoKey] that can be used for creating self-signed certificates and passed to [method StreamPeerSSL.accept_stream]. diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index 6db6fea779c..8c825c9e1c5 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -5,7 +5,7 @@ The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource]. - They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate. + They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate. diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 6ec1545bc76..f7de79913c9 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -82,7 +82,7 @@ - + diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml index 27a78cd7d1b..7cd95390e6f 100644 --- a/doc/classes/Skeleton.xml +++ b/doc/classes/Skeleton.xml @@ -54,6 +54,15 @@ Returns the amount of bones in the skeleton. + + + + + + + Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose. + + @@ -161,6 +170,16 @@ + + + + + + + + + + diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index fe70c2fdac4..1ab5c58a30f 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -89,8 +89,10 @@ + + - Returns the tooltip for the button in column [code]column[/code]. + Returns the tooltip string for the button at index [code]button_idx[/code] in column [code]column[/code]. diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml index 8066f653910..50e9e4e0d48 100644 --- a/doc/classes/X509Certificate.xml +++ b/doc/classes/X509Certificate.xml @@ -5,7 +5,7 @@ The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource]. - They can be used as the server certificate in [StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [StreamPeerSSL.connect_to_stream]. + They can be used as the server certificate in [method StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [method StreamPeerSSL.connect_to_stream]. diff --git a/modules/visual_script/config.py b/modules/visual_script/config.py index 04e1a40b816..087a13a2004 100644 --- a/modules/visual_script/config.py +++ b/modules/visual_script/config.py @@ -11,6 +11,7 @@ def get_doc_classes(): "VisualScriptBuiltinFunc", "VisualScriptClassConstant", "VisualScriptComment", + "VisualScriptComposeArray", "VisualScriptCondition", "VisualScriptConstant", "VisualScriptConstructor", @@ -28,6 +29,7 @@ def get_doc_classes(): "VisualScriptIndexSet", "VisualScriptInputAction", "VisualScriptIterator", + "VisualScriptLists", "VisualScriptLocalVarSet", "VisualScriptLocalVar", "VisualScriptMathConstant", diff --git a/modules/visual_script/doc_classes/VisualScriptLists.xml b/modules/visual_script/doc_classes/VisualScriptLists.xml index eac0b218af0..8cf3eb1d383 100644 --- a/modules/visual_script/doc_classes/VisualScriptLists.xml +++ b/modules/visual_script/doc_classes/VisualScriptLists.xml @@ -12,11 +12,11 @@ - + - + - + @@ -24,11 +24,11 @@ - + - + - + @@ -36,7 +36,7 @@ - + @@ -44,7 +44,7 @@ - + @@ -52,9 +52,9 @@ - + - + @@ -62,9 +62,9 @@ - + - + @@ -72,9 +72,9 @@ - + - + @@ -82,9 +82,9 @@ - + - + diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 8c849b28c8c..dbcd3c19f84 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -700,15 +700,15 @@ VisualScriptLists::VisualScriptLists() { } void VisualScriptLists::_bind_methods() { - ClassDB::bind_method(D_METHOD("add_input_data_port"), &VisualScriptLists::add_input_data_port); - ClassDB::bind_method(D_METHOD("set_input_data_port_name"), &VisualScriptLists::set_input_data_port_name); - ClassDB::bind_method(D_METHOD("set_input_data_port_type"), &VisualScriptLists::set_input_data_port_type); - ClassDB::bind_method(D_METHOD("remove_input_data_port"), &VisualScriptLists::remove_input_data_port); + ClassDB::bind_method(D_METHOD("add_input_data_port", "type", "name", "index"), &VisualScriptLists::add_input_data_port); + ClassDB::bind_method(D_METHOD("set_input_data_port_name", "index", "name"), &VisualScriptLists::set_input_data_port_name); + ClassDB::bind_method(D_METHOD("set_input_data_port_type", "index", "type"), &VisualScriptLists::set_input_data_port_type); + ClassDB::bind_method(D_METHOD("remove_input_data_port", "index"), &VisualScriptLists::remove_input_data_port); - ClassDB::bind_method(D_METHOD("add_output_data_port"), &VisualScriptLists::add_output_data_port); - ClassDB::bind_method(D_METHOD("set_output_data_port_name"), &VisualScriptLists::set_output_data_port_name); - ClassDB::bind_method(D_METHOD("set_output_data_port_type"), &VisualScriptLists::set_output_data_port_type); - ClassDB::bind_method(D_METHOD("remove_output_data_port"), &VisualScriptLists::remove_output_data_port); + ClassDB::bind_method(D_METHOD("add_output_data_port", "type", "name", "index"), &VisualScriptLists::add_output_data_port); + ClassDB::bind_method(D_METHOD("set_output_data_port_name", "index", "name"), &VisualScriptLists::set_output_data_port_name); + ClassDB::bind_method(D_METHOD("set_output_data_port_type", "index", "type"), &VisualScriptLists::set_output_data_port_type); + ClassDB::bind_method(D_METHOD("remove_output_data_port", "index"), &VisualScriptLists::remove_output_data_port); } ////////////////////////////////////////// diff --git a/scene/gui/rich_text_effect.cpp b/scene/gui/rich_text_effect.cpp index e0bb3ae219a..f9e0be5b314 100644 --- a/scene/gui/rich_text_effect.cpp +++ b/scene/gui/rich_text_effect.cpp @@ -119,6 +119,7 @@ CharFXTransform::CharFXTransform() { offset = Point2(); color = Color(); character = 0; + elapsed_time = 0.0f; } CharFXTransform::~CharFXTransform() { diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index b01d782f000..2fc4be6900c 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -800,7 +800,7 @@ void TreeItem::_bind_methods() { ClassDB::bind_method(D_METHOD("add_button", "column", "button", "button_idx", "disabled", "tooltip"), &TreeItem::add_button, DEFVAL(-1), DEFVAL(false), DEFVAL("")); ClassDB::bind_method(D_METHOD("get_button_count", "column"), &TreeItem::get_button_count); - ClassDB::bind_method(D_METHOD("get_button_tooltip", "column"), &TreeItem::get_button_tooltip); + ClassDB::bind_method(D_METHOD("get_button_tooltip", "column", "button_idx"), &TreeItem::get_button_tooltip); ClassDB::bind_method(D_METHOD("get_button", "column", "button_idx"), &TreeItem::get_button); ClassDB::bind_method(D_METHOD("set_button", "column", "button_idx", "button"), &TreeItem::set_button); ClassDB::bind_method(D_METHOD("erase_button", "column", "button_idx"), &TreeItem::erase_button); diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index c94e143580b..124e4d37e67 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -96,7 +96,7 @@ void Font::_bind_methods() { ClassDB::bind_method(D_METHOD("get_height"), &Font::get_height); ClassDB::bind_method(D_METHOD("is_distance_field_hint"), &Font::is_distance_field_hint); ClassDB::bind_method(D_METHOD("get_string_size", "string"), &Font::get_string_size); - ClassDB::bind_method(D_METHOD("get_wordwrap_string_size", "string", "p_width"), &Font::get_wordwrap_string_size); + ClassDB::bind_method(D_METHOD("get_wordwrap_string_size", "string", "width"), &Font::get_wordwrap_string_size); ClassDB::bind_method(D_METHOD("has_outline"), &Font::has_outline); ClassDB::bind_method(D_METHOD("draw_char", "canvas_item", "position", "char", "next", "modulate", "outline"), &Font::draw_char, DEFVAL(-1), DEFVAL(Color(1, 1, 1)), DEFVAL(false)); ClassDB::bind_method(D_METHOD("update_changes"), &Font::update_changes);