summaryrefslogtreecommitdiff
path: root/modules/visual_script
diff options
context:
space:
mode:
Diffstat (limited to 'modules/visual_script')
-rw-r--r--modules/visual_script/SCsub5
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstructor.xml52
-rw-r--r--modules/visual_script/doc_classes/VisualScriptDeconstruct.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionCall.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptNode.xml4
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertyGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertySet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYield.xml16
-rw-r--r--modules/visual_script/register_types.cpp2
-rw-r--r--modules/visual_script/visual_script.cpp3
-rw-r--r--modules/visual_script/visual_script_flow_control.cpp6
-rw-r--r--modules/visual_script/visual_script_nodes.cpp8
13 files changed, 56 insertions, 52 deletions
diff --git a/modules/visual_script/SCsub b/modules/visual_script/SCsub
index 0882406761..96ee911ba0 100644
--- a/modules/visual_script/SCsub
+++ b/modules/visual_script/SCsub
@@ -1,7 +1,10 @@
#!/usr/bin/env python
Import('env')
+Import('env_modules')
-env.add_source_files(env.modules_sources, "*.cpp")
+env_vs = env_modules.Clone()
+
+env_vs.add_source_files(env.modules_sources, "*.cpp")
Export('env')
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index cc55b72ec7..46bd35dd73 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -495,10 +495,6 @@
</description>
</method>
</methods>
- <members>
- <member name="data" type="Dictionary" setter="_set_data" getter="_get_data">
- </member>
- </members>
<signals>
<signal name="node_ports_changed">
<argument index="0" name="function" type="String">
diff --git a/modules/visual_script/doc_classes/VisualScriptConstructor.xml b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
index f3c6b6a304..cbe8c6c096 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstructor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
@@ -11,31 +11,35 @@
<demos>
</demos>
<methods>
+ <method name="get_constructor" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_constructor_type" qualifiers="const">
+ <return type="int" enum="Variant.Type">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_constructor">
+ <return type="void">
+ </return>
+ <argument index="0" name="constructor" type="Dictionary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_constructor_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
- <members>
- <member name="constructor" type="Dictionary" setter="set_constructor" getter="get_constructor">
- The constructor function's method info. Has roughly the following structure:
- [codeblock]
- {
- name = "string",
- args = [{
- name = "string"
- class_name = "string"
- type = TYPE_*
- hint = PROPERTY_HINT_*
- hint_string = "string"
- }]
- default_args = [] # Array of variants
- flags = METHOD_FLAG_*
- id = 0
- return = {type = TYPE_*}
- }
- [/codeblock]
- </member>
- <member name="type" type="int" setter="set_constructor_type" getter="get_constructor_type" enum="Variant.Type">
- The type to be constructed.
- </member>
- </members>
<constants>
</constants>
</class>
diff --git a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
index 86cf4410ac..0f396564e2 100644
--- a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
+++ b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
@@ -13,8 +13,6 @@
<methods>
</methods>
<members>
- <member name="elem_cache" type="Array" setter="_set_elem_cache" getter="_get_elem_cache">
- </member>
<member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" enum="Variant.Type">
The type to deconstruct.
</member>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
index cc2360fc2e..03c47dca7c 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
@@ -11,8 +11,6 @@
<methods>
</methods>
<members>
- <member name="argument_cache" type="Dictionary" setter="_set_argument_cache" getter="_get_argument_cache">
- </member>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
</member>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type">
diff --git a/modules/visual_script/doc_classes/VisualScriptNode.xml b/modules/visual_script/doc_classes/VisualScriptNode.xml
index 94fed44950..ef7cf7c3b8 100644
--- a/modules/visual_script/doc_classes/VisualScriptNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptNode.xml
@@ -46,10 +46,6 @@
</description>
</method>
</methods>
- <members>
- <member name="_default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values">
- </member>
- </members>
<signals>
<signal name="ports_changed">
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
index f68f0edeea..11c50f2b97 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
@@ -25,8 +25,6 @@
</member>
<member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertyGet.CallMode">
</member>
- <member name="type_cache" type="int" setter="_set_type_cache" getter="_get_type_cache" enum="Variant.Type">
- </member>
</members>
<constants>
<constant name="CALL_MODE_SELF" value="0" enum="CallMode">
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
index d4305af57f..2e96ccc1f6 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
@@ -27,8 +27,6 @@
</member>
<member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertySet.CallMode">
</member>
- <member name="type_cache" type="Dictionary" setter="_set_type_cache" getter="_get_type_cache">
- </member>
</members>
<constants>
<constant name="CALL_MODE_SELF" value="0" enum="CallMode">
diff --git a/modules/visual_script/doc_classes/VisualScriptYield.xml b/modules/visual_script/doc_classes/VisualScriptYield.xml
index b42fc027cf..72ef586c1f 100644
--- a/modules/visual_script/doc_classes/VisualScriptYield.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYield.xml
@@ -9,10 +9,22 @@
<demos>
</demos>
<methods>
+ <method name="get_yield_mode">
+ <return type="int" enum="VisualScriptYield.YieldMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_yield_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptYield.YieldMode">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<members>
- <member name="mode" type="int" setter="set_yield_mode" getter="get_yield_mode" enum="VisualScriptYield.YieldMode">
- </member>
<member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time">
</member>
</members>
diff --git a/modules/visual_script/register_types.cpp b/modules/visual_script/register_types.cpp
index b6ce10381d..ecdca7eb42 100644
--- a/modules/visual_script/register_types.cpp
+++ b/modules/visual_script/register_types.cpp
@@ -53,7 +53,7 @@ void register_visual_script_types() {
ClassDB::register_class<VisualScript>();
ClassDB::register_virtual_class<VisualScriptNode>();
- ClassDB::register_virtual_class<VisualScriptFunctionState>();
+ ClassDB::register_class<VisualScriptFunctionState>();
ClassDB::register_class<VisualScriptFunction>();
ClassDB::register_class<VisualScriptOperator>();
ClassDB::register_class<VisualScriptVariableSet>();
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 26f2d687d8..53d93798d9 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -2047,6 +2047,7 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
function.argument_count = func_node->get_argument_count();
function.max_stack += function.argument_count;
function.flow_stack_size = func_node->is_stack_less() ? 0 : func_node->get_stack_size();
+ max_input_args = MAX(max_input_args, function.argument_count);
}
//multiple passes are required to set up this complex thing..
@@ -2289,7 +2290,7 @@ void VisualScriptFunctionState::connect_to_signal(Object *p_obj, const String &p
binds.push_back(p_binds[i]);
}
binds.push_back(Ref<VisualScriptFunctionState>(this)); //add myself on the back to avoid dying from unreferencing
- p_obj->connect(p_signal, this, "_signal_callback", binds);
+ p_obj->connect(p_signal, this, "_signal_callback", binds, CONNECT_ONESHOT);
}
bool VisualScriptFunctionState::is_valid() const {
diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp
index 59d9540239..a38266acc0 100644
--- a/modules/visual_script/visual_script_flow_control.cpp
+++ b/modules/visual_script/visual_script_flow_control.cpp
@@ -731,9 +731,9 @@ void VisualScriptSwitch::_bind_methods() {
VisualScriptSwitch::VisualScriptSwitch() {
}
-//////////////////////////////////////////
-////////////////EVENT ACTION FILTER///////////
-//////////////////////////////////////////
+ //////////////////////////////////////////
+ ////////////////EVENT ACTION FILTER///////////
+ //////////////////////////////////////////
#if 0
int VisualScriptInputFilter::get_output_sequence_port_count() const {
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 95ad7256b3..5f98951bec 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -390,7 +390,7 @@ PropertyInfo VisualScriptOperator::get_input_value_port_info(int p_idx) const {
{ Variant::NIL, Variant::NIL }, //OP_GREATER_EQUAL,
//mathematic
{ Variant::NIL, Variant::NIL }, //OP_ADD,
- { Variant::NIL, Variant::NIL }, //OP_SUBSTRACT,
+ { Variant::NIL, Variant::NIL }, //OP_SUBTRACT,
{ Variant::NIL, Variant::NIL }, //OP_MULTIPLY,
{ Variant::NIL, Variant::NIL }, //OP_DIVIDE,
{ Variant::NIL, Variant::NIL }, //OP_NEGATE,
@@ -433,7 +433,7 @@ PropertyInfo VisualScriptOperator::get_output_value_port_info(int p_idx) const {
Variant::BOOL, //OP_GREATER_EQUAL,
//mathematic
Variant::NIL, //OP_ADD,
- Variant::NIL, //OP_SUBSTRACT,
+ Variant::NIL, //OP_SUBTRACT,
Variant::NIL, //OP_MULTIPLY,
Variant::NIL, //OP_DIVIDE,
Variant::NIL, //OP_NEGATE,
@@ -474,7 +474,7 @@ static const char *op_names[] = {
"GreaterEq", //OP_GREATER_EQUAL,
//mathematic
"Add", //OP_ADD,
- "Subtract", //OP_SUBSTRACT,
+ "Subtract", //OP_SUBTRACT,
"Multiply", //OP_MULTIPLY,
"Divide", //OP_DIVIDE,
"Negate", //OP_NEGATE,
@@ -514,7 +514,7 @@ String VisualScriptOperator::get_text() const {
L"A \u2265 B", //OP_GREATER_EQUAL,
//mathematic
L"A + B", //OP_ADD,
- L"A - B", //OP_SUBSTRACT,
+ L"A - B", //OP_SUBTRACT,
L"A x B", //OP_MULTIPLY,
L"A \u00F7 B", //OP_DIVIDE,
L"\u00AC A", //OP_NEGATE,