-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.x]Expose visual script custom node type hints #48900
[3.x]Expose visual script custom node type hints #48900
Conversation
Redo of https://github.com/godotengine/godot/pull/48853/commits I messed up the merge |
You should click it to see details about why it failed: https://github.com/godotengine/godot/runs/2633115286 Here it failed because you change the API but did not sync the documentation to match it:
diff --git a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
index 8b17acd..60c1c48 100644
--- a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
@@ -30,40 +30,40 @@
Return the count of input value ports.
</description>
</method>
- <method name="_get_input_value_port_name" qualifiers="virtual">
- <return type="String">
+ <method name="_get_input_value_port_hint" qualifiers="virtual">
+ <return type="int">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the specified input port's name.
+ Return the specified input port's hint. See the [enum @GlobalScope.PropertyHint] hints.
</description>
</method>
- <method name="_get_input_value_port_type" qualifiers="virtual">
- <return type="int">
+ <method name="_get_input_value_port_hint_string" qualifiers="virtual">
+ <return type="String">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the specified input port's type. See the [enum Variant.Type] values.
+ Return the specified input port's hint_string.
</description>
</method>
- <method name="_get_input_value_port_hint" qualifiers="virtual">
- <return type="int">
+ <method name="_get_input_value_port_name" qualifiers="virtual">
+ <return type="String">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the specified input port's hint. See the [enum @GlobalScope.PropertyHint] hints.
+ Return the specified input port's name.
</description>
</method>
- <method name="_get_input_value_port_hint_string" qualifiers="virtual">
- <return type="String">
+ <method name="_get_input_value_port_type" qualifiers="virtual">
+ <return type="int">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the specified input port's hint_string.
+ Return the specified input port's type. See the [enum Variant.Type] values.
</description>
</method>
<method name="_get_output_sequence_port_count" qualifiers="virtual">
@@ -89,40 +89,40 @@
Return the amount of output value ports.
</description>
</method>
- <method name="_get_output_value_port_name" qualifiers="virtual">
- <return type="String">
+ <method name="_get_output_value_port_hint" qualifiers="virtual">
+ <return type="int">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the specified output ports name.
+ Return the specified output ports hint. See the [enum @GlobalScope.PropertyHint] hints.
</description>
</method>
- <method name="_get_output_value_port_type" qualifiers="virtual">
- <return type="int">
+ <method name="_get_output_value_port_hint_string" qualifiers="virtual">
+ <return type="String">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the specified output ports type. See the [enum Variant.Type] values.
+ Return the specified output ports hint_string.
</description>
</method>
- <method name="_get_output_value_port_hint" qualifiers="virtual">
- <return type="int">
+ <method name="_get_output_value_port_name" qualifiers="virtual">
+ <return type="String">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the specified output ports hint. See the [enum @GlobalScope.PropertyHint] hints.
+ Return the specified output ports name.
</description>
</method>
- <method name="_get_output_value_port_hint_string" qualifiers="virtual">
- <return type="String">
+ <method name="_get_output_value_port_type" qualifiers="virtual">
+ <return type="int">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the specified output ports hint_string.
+ Return the specified output ports type. See the [enum Variant.Type] values.
</description>
</method>
<method name="_get_text" qualifiers="virtual"> |
clang-format
Waiting for CICD to pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Paper review.
Hi |
Will make a mew backport from #48972 when that is merged |
Expose the minimal of new virtual methods to give the Node creator all tools needed to create full type hints for input and output ports.
Improves the default guess_output_type() for VisualScriptCustomNode class.
Fixes issues/2692
PS: When developing I have started to (re)create a advanced subcall pluggin as a fix by itself and as a test of the functionality