summaryrefslogtreecommitdiff
path: root/modules/visual_script
diff options
context:
space:
mode:
Diffstat (limited to 'modules/visual_script')
-rw-r--r--modules/visual_script/visual_script.h4
-rw-r--r--modules/visual_script/visual_script_editor.cpp14
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp6
-rw-r--r--modules/visual_script/visual_script_func_nodes.h2
-rw-r--r--modules/visual_script/visual_script_nodes.cpp1
-rw-r--r--modules/visual_script/visual_script_nodes.h6
6 files changed, 17 insertions, 16 deletions
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 63ac5769c6..b61b67a890 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -291,8 +291,8 @@ public:
void data_disconnect(const StringName &p_func, int p_from_node, int p_from_port, int p_to_node, int p_to_port);
bool has_data_connection(const StringName &p_func, int p_from_node, int p_from_port, int p_to_node, int p_to_port) const;
void get_data_connection_list(const StringName &p_func, List<DataConnection> *r_connection) const;
- bool is_input_value_port_connected(const StringName &p_name, int p_node, int p_port) const;
- bool get_input_value_port_connection_source(const StringName &p_name, int p_node, int p_port, int *r_node, int *r_port) const;
+ bool is_input_value_port_connected(const StringName &p_func, int p_node, int p_port) const;
+ bool get_input_value_port_connection_source(const StringName &p_func, int p_node, int p_port, int *r_node, int *r_port) const;
void add_variable(const StringName &p_name, const Variant &p_default_value = Variant(), bool p_export = false);
bool has_variable(const StringName &p_name) const;
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 8912227692..0f6b47c56d 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -2450,17 +2450,17 @@ void VisualScriptEditor::_graph_connect_to_empty(const String &p_from, int p_fro
port_action_popup->popup();
}
-VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_node, int p_output, Set<int> &visited_nodes) {
+VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_port_action_node, int p_port_action_output, Set<int> &visited_nodes) {
VisualScriptNode::TypeGuess tg;
tg.type = Variant::NIL;
- if (visited_nodes.has(p_node))
+ if (visited_nodes.has(p_port_action_node))
return tg; //no loop
- visited_nodes.insert(p_node);
+ visited_nodes.insert(p_port_action_node);
- Ref<VisualScriptNode> node = script->get_node(edited_func, p_node);
+ Ref<VisualScriptNode> node = script->get_node(edited_func, p_port_action_node);
if (!node.is_valid()) {
@@ -2479,7 +2479,7 @@ VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_node, i
int from_node;
int from_port;
- if (script->get_input_value_port_connection_source(edited_func, p_node, i, &from_node, &from_port)) {
+ if (script->get_input_value_port_connection_source(edited_func, p_port_action_node, i, &from_node, &from_port)) {
g = _guess_output_type(from_node, from_port, visited_nodes);
} else {
@@ -2501,7 +2501,7 @@ VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_node, i
in_guesses.push_back(g);
}
- return node->guess_output_type(in_guesses.ptr(), p_output);
+ return node->guess_output_type(in_guesses.ptr(), p_port_action_output);
}
void VisualScriptEditor::_port_action_menu(int p_option) {
@@ -3271,7 +3271,7 @@ VisualScriptEditor::VisualScriptEditor() {
graph->set_area_as_parent_rect();
hint_text = memnew(Label);
- hint_text->set_anchor_and_margin(MARGIN_TOP, ANCHOR_END, 100);
+ hint_text->set_anchor_and_margin(MARGIN_TOP, ANCHOR_END, -100);
hint_text->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, 0);
hint_text->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 0);
hint_text->set_align(Label::ALIGN_CENTER);
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 3c057cdbd5..afdf50027e 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -341,12 +341,12 @@ String VisualScriptFunctionCall::get_base_script() const {
return base_script;
}
-void VisualScriptFunctionCall::set_singleton(const StringName &p_path) {
+void VisualScriptFunctionCall::set_singleton(const StringName &p_type) {
- if (singleton == p_path)
+ if (singleton == p_type)
return;
- singleton = p_path;
+ singleton = p_type;
Object *obj = ProjectSettings::get_singleton()->get_singleton_object(singleton);
if (obj) {
base_type = obj->get_class();
diff --git a/modules/visual_script/visual_script_func_nodes.h b/modules/visual_script/visual_script_func_nodes.h
index 7839748661..3b38d0d08f 100644
--- a/modules/visual_script/visual_script_func_nodes.h
+++ b/modules/visual_script/visual_script_func_nodes.h
@@ -70,7 +70,7 @@ private:
MethodInfo method_cache;
void _update_method_cache();
- void _set_argument_cache(const Dictionary &p_args);
+ void _set_argument_cache(const Dictionary &p_cache);
Dictionary _get_argument_cache() const;
protected:
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 923e425997..4f9cd4a33b 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -1208,6 +1208,7 @@ void VisualScriptPreload::set_preload(const Ref<Resource> &p_preload) {
preload = p_preload;
ports_changed_notify();
}
+
Ref<Resource> VisualScriptPreload::get_preload() const {
return preload;
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index ff49417114..6ce906efe0 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -196,7 +196,7 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "data"; }
- void set_variable(StringName p_var);
+ void set_variable(StringName p_variable);
StringName get_variable() const;
virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
@@ -230,7 +230,7 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "data"; }
- void set_variable(StringName p_var);
+ void set_variable(StringName p_variable);
StringName get_variable() const;
virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
@@ -301,7 +301,7 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "data"; }
- void set_preload(const Ref<Resource> &p_value);
+ void set_preload(const Ref<Resource> &p_preload);
Ref<Resource> get_preload() const;
virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);