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.cpp5
-rw-r--r--modules/visual_script/visual_script_editor.cpp175
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp14
-rw-r--r--modules/visual_script/visual_script_nodes.cpp8
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp8
-rw-r--r--modules/visual_script/visual_script_yield_nodes.h2
6 files changed, 131 insertions, 81 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index c665fa12cf..48145495e4 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -125,6 +125,7 @@ void VisualScriptNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_visual_script"), &VisualScriptNode::get_visual_script);
ClassDB::bind_method(D_METHOD("set_default_input_value", "port_idx", "value"), &VisualScriptNode::set_default_input_value);
ClassDB::bind_method(D_METHOD("get_default_input_value", "port_idx"), &VisualScriptNode::get_default_input_value);
+ ClassDB::bind_method(D_METHOD("ports_changed_notify"), &VisualScriptNode::ports_changed_notify);
ClassDB::bind_method(D_METHOD("_set_default_input_values", "values"), &VisualScriptNode::_set_default_input_values);
ClassDB::bind_method(D_METHOD("_get_default_input_values"), &VisualScriptNode::_get_default_input_values);
@@ -2008,8 +2009,8 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
Node *node = Object::cast_to<Node>(p_owner);
if (p_script->functions.has("_process"))
node->set_process(true);
- if (p_script->functions.has("_fixed_process"))
- node->set_fixed_process(true);
+ if (p_script->functions.has("_physics_process"))
+ node->set_physics_process(true);
if (p_script->functions.has("_input"))
node->set_process_input(true);
if (p_script->functions.has("_unhandled_input"))
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index d0ab29f184..47ef0182dc 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -331,44 +331,83 @@ public:
VisualScriptEditorVariableEdit() { undo_redo = NULL; }
};
-static Color _color_from_type(Variant::Type p_type) {
+static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
Color color;
- switch (p_type) {
- case Variant::NIL: color = Color::html("69ecbd"); break;
-
- case Variant::BOOL: color = Color::html("8da6f0"); break;
- case Variant::INT: color = Color::html("7dc6ef"); break;
- case Variant::REAL: color = Color::html("61daf4"); break;
- case Variant::STRING: color = Color::html("6ba7ec"); break;
-
- case Variant::VECTOR2: color = Color::html("bd91f1"); break;
- case Variant::RECT2: color = Color::html("f191a5"); break;
- case Variant::VECTOR3: color = Color::html("d67dee"); break;
- case Variant::TRANSFORM2D: color = Color::html("c4ec69"); break;
- case Variant::PLANE: color = Color::html("f77070"); break;
- case Variant::QUAT: color = Color::html("ec69a3"); break;
- case Variant::RECT3: color = Color::html("ee7991"); break;
- case Variant::BASIS: color = Color::html("e3ec69"); break;
- case Variant::TRANSFORM: color = Color::html("f6a86e"); break;
-
- case Variant::COLOR: color = Color::html("9dff70"); break;
- case Variant::NODE_PATH: color = Color::html("6993ec"); break;
- case Variant::_RID: color = Color::html("69ec9a"); break;
- case Variant::OBJECT: color = Color::html("79f3e8"); break;
- case Variant::DICTIONARY: color = Color::html("77edb1"); break;
-
- case Variant::ARRAY: color = Color::html("e0e0e0"); break;
- case Variant::POOL_BYTE_ARRAY: color = Color::html("aaf4c8"); break;
- case Variant::POOL_INT_ARRAY: color = Color::html("afdcf5"); break;
- case Variant::POOL_REAL_ARRAY: color = Color::html("97e7f8"); break;
- case Variant::POOL_STRING_ARRAY: color = Color::html("9dc4f2"); break;
- case Variant::POOL_VECTOR2_ARRAY: color = Color::html("d1b3f5"); break;
- case Variant::POOL_VECTOR3_ARRAY: color = Color::html("df9bf2"); break;
- case Variant::POOL_COLOR_ARRAY: color = Color::html("e9ff97"); break;
-
- default:
- color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.7, 0.7);
- }
+ if (dark_theme)
+ switch (p_type) {
+ case Variant::NIL: color = Color::html("#69ecbd"); break;
+
+ case Variant::BOOL: color = Color::html("#8da6f0"); break;
+ case Variant::INT: color = Color::html("#7dc6ef"); break;
+ case Variant::REAL: color = Color::html("#61daf4"); break;
+ case Variant::STRING: color = Color::html("#6ba7ec"); break;
+
+ case Variant::VECTOR2: color = Color::html("#bd91f1"); break;
+ case Variant::RECT2: color = Color::html("#f191a5"); break;
+ case Variant::VECTOR3: color = Color::html("#d67dee"); break;
+ case Variant::TRANSFORM2D: color = Color::html("#c4ec69"); break;
+ case Variant::PLANE: color = Color::html("#f77070"); break;
+ case Variant::QUAT: color = Color::html("#ec69a3"); break;
+ case Variant::RECT3: color = Color::html("#ee7991"); break;
+ case Variant::BASIS: color = Color::html("#e3ec69"); break;
+ case Variant::TRANSFORM: color = Color::html("#f6a86e"); break;
+
+ case Variant::COLOR: color = Color::html("#9dff70"); break;
+ case Variant::NODE_PATH: color = Color::html("#6993ec"); break;
+ case Variant::_RID: color = Color::html("#69ec9a"); break;
+ case Variant::OBJECT: color = Color::html("#79f3e8"); break;
+ case Variant::DICTIONARY: color = Color::html("#77edb1"); break;
+
+ case Variant::ARRAY: color = Color::html("#e0e0e0"); break;
+ case Variant::POOL_BYTE_ARRAY: color = Color::html("#aaf4c8"); break;
+ case Variant::POOL_INT_ARRAY: color = Color::html("#afdcf5"); break;
+ case Variant::POOL_REAL_ARRAY: color = Color::html("#97e7f8"); break;
+ case Variant::POOL_STRING_ARRAY: color = Color::html("#9dc4f2"); break;
+ case Variant::POOL_VECTOR2_ARRAY: color = Color::html("#d1b3f5"); break;
+ case Variant::POOL_VECTOR3_ARRAY: color = Color::html("#df9bf2"); break;
+ case Variant::POOL_COLOR_ARRAY: color = Color::html("#e9ff97"); break;
+
+ default:
+ color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.7, 0.7);
+ }
+ else
+ switch (p_type) {
+ case Variant::NIL: color = Color::html("#25e3a0"); break;
+
+ case Variant::BOOL: color = Color::html("#6d8eeb"); break;
+ case Variant::INT: color = Color::html("#4fb2e9"); break;
+ case Variant::REAL: color = Color::html("#27ccf0"); break;
+ case Variant::STRING: color = Color::html("#4690e7"); break;
+
+ case Variant::VECTOR2: color = Color::html("#ad76ee"); break;
+ case Variant::RECT2: color = Color::html("#ee758e"); break;
+ case Variant::VECTOR3: color = Color::html("#dc6aed"); break;
+ case Variant::TRANSFORM2D: color = Color::html("#96ce1a"); break;
+ case Variant::PLANE: color = Color::html("#f77070"); break;
+ case Variant::QUAT: color = Color::html("#ec69a3"); break;
+ case Variant::RECT3: color = Color::html("#ee7991"); break;
+ case Variant::BASIS: color = Color::html("#b2bb19"); break;
+ case Variant::TRANSFORM: color = Color::html("#f49047"); break;
+
+ case Variant::COLOR: color = Color::html("#3cbf00"); break;
+ case Variant::NODE_PATH: color = Color::html("#6993ec"); break;
+ case Variant::_RID: color = Color::html("#2ce573"); break;
+ case Variant::OBJECT: color = Color::html("#12d5c3"); break;
+ case Variant::DICTIONARY: color = Color::html("#57e99f"); break;
+
+ case Variant::ARRAY: color = Color::html("#737373"); break;
+ case Variant::POOL_BYTE_ARRAY: color = Color::html("#61ea98"); break;
+ case Variant::POOL_INT_ARRAY: color = Color::html("#61baeb"); break;
+ case Variant::POOL_REAL_ARRAY: color = Color::html("#40d3f2"); break;
+ case Variant::POOL_STRING_ARRAY: color = Color::html("#609fea"); break;
+ case Variant::POOL_VECTOR2_ARRAY: color = Color::html("#9d5dea"); break;
+ case Variant::POOL_VECTOR3_ARRAY: color = Color::html("#ca5aea"); break;
+ case Variant::POOL_COLOR_ARRAY: color = Color::html("#92ba00"); break;
+
+ default:
+ color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.3, 0.3);
+ }
+
return color;
}
@@ -531,7 +570,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Color c = sbf->get_border_color(MARGIN_TOP);
c.a = 1;
if (EditorSettings::get_singleton()->get("interface/theme/use_graph_node_headers")) {
- Color mono_color = ((c.r + c.g + c.b) / 3) < 0.5 ? Color(1.0, 1.0, 1.0) : Color(0, 0, 0);
+ Color mono_color = ((c.r + c.g + c.b) / 3) < 0.7 ? Color(1.0, 1.0, 1.0) : Color(0.0, 0.0, 0.0);
mono_color.a = 0.85;
c = mono_color;
}
@@ -542,10 +581,12 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->add_style_override("frame", sbf);
}
+ const Color mono_color = get_color("mono_color", "Editor");
+
int slot_idx = 0;
bool single_seq_output = node->get_output_sequence_port_count() == 1 && node->get_output_sequence_port_text(0) == String();
- gnode->set_slot(0, node->has_input_sequence_port(), TYPE_SEQUENCE, Color(1, 1, 1, 1), single_seq_output, TYPE_SEQUENCE, Color(1, 1, 1, 1), seq_port, seq_port);
+ gnode->set_slot(0, node->has_input_sequence_port(), TYPE_SEQUENCE, mono_color, single_seq_output, TYPE_SEQUENCE, mono_color, seq_port, seq_port);
gnode->set_offset(pos * EDSCALE);
slot_idx++;
@@ -562,7 +603,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
text2->set_text(node->get_output_sequence_port_text(i));
text2->set_align(Label::ALIGN_RIGHT);
gnode->add_child(text2);
- gnode->set_slot(slot_idx, false, 0, Color(), true, TYPE_SEQUENCE, Color(1, 1, 1, 1), seq_port, seq_port);
+ gnode->set_slot(slot_idx, false, 0, Color(), true, TYPE_SEQUENCE, mono_color, seq_port, seq_port);
slot_idx++;
}
}
@@ -677,10 +718,11 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->add_child(hbc);
+ bool dark_theme = get_constant("dark_theme", "Editor");
if (i < mixed_seq_ports) {
- gnode->set_slot(slot_idx, left_ok, left_type, _color_from_type(left_type), true, TYPE_SEQUENCE, Color(1, 1, 1, 1), Ref<Texture>(), seq_port);
+ gnode->set_slot(slot_idx, left_ok, left_type, _color_from_type(left_type, dark_theme), true, TYPE_SEQUENCE, mono_color, Ref<Texture>(), seq_port);
} else {
- gnode->set_slot(slot_idx, left_ok, left_type, _color_from_type(left_type), right_ok, right_type, _color_from_type(right_type));
+ gnode->set_slot(slot_idx, left_ok, left_type, _color_from_type(left_type, dark_theme), right_ok, right_type, _color_from_type(right_type, dark_theme));
}
slot_idx++;
@@ -710,7 +752,7 @@ void VisualScriptEditor::_update_members() {
functions->set_text(0, TTR("Functions:"));
functions->add_button(0, Control::get_icon("Override", "EditorIcons"), 1);
functions->add_button(0, Control::get_icon("Add", "EditorIcons"), 0);
- functions->set_custom_bg_color(0, Control::get_color("prop_section", "Editor"));
+ functions->set_custom_color(0, Control::get_color("mono_color", "Editor"));
List<StringName> func_names;
script->get_function_list(&func_names);
@@ -719,13 +761,7 @@ void VisualScriptEditor::_update_members() {
ti->set_text(0, E->get());
ti->set_selectable(0, true);
ti->set_editable(0, true);
- //ti->add_button(0,Control::get_icon("Edit","EditorIcons"),0); function arguments are in the node now
- //ti->add_button(0, Control::get_icon("Del", "EditorIcons"), 1);
ti->set_metadata(0, E->get());
- if (E->get() == edited_func) {
- ti->set_custom_bg_color(0, get_color("prop_category", "Editor"));
- ti->set_custom_color(0, Color(1, 1, 1, 1));
- }
if (selected == E->get())
ti->select(0);
}
@@ -734,7 +770,7 @@ void VisualScriptEditor::_update_members() {
variables->set_selectable(0, false);
variables->set_text(0, TTR("Variables:"));
variables->add_button(0, Control::get_icon("Add", "EditorIcons"));
- variables->set_custom_bg_color(0, Control::get_color("prop_section", "Editor"));
+ variables->set_custom_color(0, Control::get_color("mono_color", "Editor"));
Ref<Texture> type_icons[Variant::VARIANT_MAX] = {
Control::get_icon("MiniVariant", "EditorIcons"),
@@ -778,8 +814,6 @@ void VisualScriptEditor::_update_members() {
ti->set_selectable(0, true);
ti->set_editable(0, true);
- //ti->add_button(0, Control::get_icon("Edit", "EditorIcons"), 0);
- //ti->add_button(0, Control::get_icon("Del", "EditorIcons"), 1);
ti->set_metadata(0, E->get());
if (selected == E->get())
ti->select(0);
@@ -789,7 +823,7 @@ void VisualScriptEditor::_update_members() {
_signals->set_selectable(0, false);
_signals->set_text(0, TTR("Signals:"));
_signals->add_button(0, Control::get_icon("Add", "EditorIcons"));
- _signals->set_custom_bg_color(0, Control::get_color("prop_section", "Editor"));
+ _signals->set_custom_color(0, Control::get_color("mono_color", "Editor"));
List<StringName> signal_names;
script->get_custom_signal_list(&signal_names);
@@ -798,8 +832,6 @@ void VisualScriptEditor::_update_members() {
ti->set_text(0, E->get());
ti->set_selectable(0, true);
ti->set_editable(0, true);
- //ti->add_button(0, Control::get_icon("Edit", "EditorIcons"), 0);
- //ti->add_button(0, Control::get_icon("Del", "EditorIcons"), 1);
ti->set_metadata(0, E->get());
if (selected == E->get())
ti->select(0);
@@ -2767,18 +2799,30 @@ void VisualScriptEditor::_notification(int p_what) {
variable_editor->connect("changed", this, "_update_members");
signal_editor->connect("changed", this, "_update_members");
+ Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme();
+
+ bool dark_theme = tm->get_constant("dark_theme", "Editor");
+
List<Pair<String, Color> > colors;
- colors.push_back(Pair<String, Color>("flow_control", Color::html("#f4f4f4")));
- colors.push_back(Pair<String, Color>("functions", Color::html("#f58581")));
- colors.push_back(Pair<String, Color>("data", Color::html("#80f6cf")));
- colors.push_back(Pair<String, Color>("operators", Color::html("#ab97df")));
- colors.push_back(Pair<String, Color>("custom", Color::html("#80bbf6")));
- colors.push_back(Pair<String, Color>("constants", Color::html("#f680b0")));
+ if (dark_theme) {
+ colors.push_back(Pair<String, Color>("flow_control", Color::html("#f4f4f4")));
+ colors.push_back(Pair<String, Color>("functions", Color::html("#f58581")));
+ colors.push_back(Pair<String, Color>("data", Color::html("#80f6cf")));
+ colors.push_back(Pair<String, Color>("operators", Color::html("#ab97df")));
+ colors.push_back(Pair<String, Color>("custom", Color::html("#80bbf6")));
+ colors.push_back(Pair<String, Color>("constants", Color::html("#f680b0")));
+ } else {
+ colors.push_back(Pair<String, Color>("flow_control", Color::html("#424242")));
+ colors.push_back(Pair<String, Color>("functions", Color::html("#f26661")));
+ colors.push_back(Pair<String, Color>("data", Color::html("#13bb83")));
+ colors.push_back(Pair<String, Color>("operators", Color::html("#8265d0")));
+ colors.push_back(Pair<String, Color>("custom", Color::html("#4ea0f2")));
+ colors.push_back(Pair<String, Color>("constants", Color::html("#f02f7d")));
+ }
for (List<Pair<String, Color> >::Element *E = colors.front(); E; E = E->next()) {
- print_line(E->get().first);
- Ref<StyleBoxFlat> sb = EditorNode::get_singleton()->get_theme_base()->get_theme()->get_stylebox("frame", "GraphNode");
- if (sb != NULL) {
+ Ref<StyleBoxFlat> sb = tm->get_stylebox("frame", "GraphNode");
+ if (!sb.is_null()) {
Ref<StyleBoxFlat> frame_style = sb->duplicate();
Color c = sb->get_border_color(MARGIN_TOP);
Color cn = E->get().second;
@@ -3267,8 +3311,7 @@ VisualScriptEditor::VisualScriptEditor() {
graph = memnew(GraphEdit);
add_child(graph);
- graph->set_area_as_parent_rect();
- graph->set_h_size_flags(SIZE_EXPAND_FILL);
+ graph->set_anchors_and_margins_preset(Control::PRESET_WIDE);
graph->connect("node_selected", this, "_node_selected");
graph->connect("_begin_node_move", this, "_begin_node_move");
graph->connect("_end_node_move", this, "_end_node_move");
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index f02e797fe6..8d73de9889 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -42,7 +42,7 @@
int VisualScriptFunctionCall::get_output_sequence_port_count() const {
- if (method_cache.flags & METHOD_FLAG_CONST || call_mode == CALL_MODE_BASIC_TYPE)
+ if (method_cache.flags & METHOD_FLAG_CONST || (call_mode == CALL_MODE_BASIC_TYPE && Variant::is_method_const(basic_type, function)))
return 0;
else
return 1;
@@ -50,7 +50,7 @@ int VisualScriptFunctionCall::get_output_sequence_port_count() const {
bool VisualScriptFunctionCall::has_input_sequence_port() const {
- if (method_cache.flags & METHOD_FLAG_CONST || call_mode == CALL_MODE_BASIC_TYPE)
+ if (method_cache.flags & METHOD_FLAG_CONST || (call_mode == CALL_MODE_BASIC_TYPE && Variant::is_method_const(basic_type, function)))
return false;
else
return true;
@@ -763,7 +763,7 @@ public:
NodePath node_path;
int input_args;
bool validate;
- bool returns;
+ int returns;
VisualScriptFunctionCall::RPCCallMode rpc_mode;
StringName function;
StringName singleton;
@@ -856,7 +856,13 @@ public:
}
} else if (returns) {
if (call_mode == VisualScriptFunctionCall::CALL_MODE_INSTANCE) {
- *p_outputs[1] = v.call(function, p_inputs + 1, input_args, r_error);
+ if (returns >= 2) {
+ *p_outputs[1] = v.call(function, p_inputs + 1, input_args, r_error);
+ } else {
+ r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
+ r_error_str = "Invalid returns count for call_mode == CALL_MODE_INSTANCE";
+ return 0;
+ }
} else {
*p_outputs[0] = v.call(function, p_inputs + 1, input_args, r_error);
}
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 16aec76e57..5a34fc3cd9 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -1109,7 +1109,7 @@ void VisualScriptConstant::_bind_methods() {
}
ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, argt), "set_constant_type", "get_constant_type");
- ADD_PROPERTY(PropertyInfo(Variant::NIL, "value"), "set_constant_value", "get_constant_value");
+ ADD_PROPERTY(PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), "set_constant_value", "get_constant_value");
}
class VisualScriptNodeInstanceConstant : public VisualScriptNodeInstance {
@@ -1598,7 +1598,7 @@ VisualScriptNodeInstance *VisualScriptClassConstant::instance(VisualScriptInstan
void VisualScriptClassConstant::_validate_property(PropertyInfo &property) const {
- if (property.name == "constant/constant") {
+ if (property.name == "constant") {
List<String> constants;
ClassDB::get_integer_constant_list(base_type, &constants, true);
@@ -1727,7 +1727,7 @@ VisualScriptNodeInstance *VisualScriptBasicTypeConstant::instance(VisualScriptIn
void VisualScriptBasicTypeConstant::_validate_property(PropertyInfo &property) const {
- if (property.name == "constant/constant") {
+ if (property.name == "constant") {
List<StringName> constants;
Variant::get_numeric_constants_for_type(type, &constants);
@@ -2689,7 +2689,7 @@ VisualScriptNodeInstance *VisualScriptCustomNode::instance(VisualScriptInstance
}
void VisualScriptCustomNode::_script_changed() {
- ports_changed_notify();
+ call_deferred("ports_changed_notify");
}
void VisualScriptCustomNode::_bind_methods() {
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index b6d4021ca3..bc033418ba 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -82,7 +82,7 @@ String VisualScriptYield::get_text() const {
switch (yield_mode) {
case YIELD_RETURN: return ""; break;
case YIELD_FRAME: return "Next Frame"; break;
- case YIELD_FIXED_FRAME: return "Next Fixed Frame"; break;
+ case YIELD_PHYSICS_FRAME: return "Next Fixed Frame"; break;
case YIELD_WAIT: return rtos(wait_time) + " sec(s)"; break;
}
@@ -122,7 +122,7 @@ public:
ret = STEP_EXIT_FUNCTION_BIT;
break; //return the yield
case VisualScriptYield::YIELD_FRAME: state->connect_to_signal(tree, "idle_frame", Array()); break;
- case VisualScriptYield::YIELD_FIXED_FRAME: state->connect_to_signal(tree, "fixed_frame", Array()); break;
+ case VisualScriptYield::YIELD_PHYSICS_FRAME: state->connect_to_signal(tree, "physics_frame", Array()); break;
case VisualScriptYield::YIELD_WAIT: state->connect_to_signal(tree->create_timer(wait_time).ptr(), "timeout", Array()); break;
}
@@ -190,7 +190,7 @@ void VisualScriptYield::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time"), "set_wait_time", "get_wait_time");
BIND_ENUM_CONSTANT(YIELD_FRAME);
- BIND_ENUM_CONSTANT(YIELD_FIXED_FRAME);
+ BIND_ENUM_CONSTANT(YIELD_PHYSICS_FRAME);
BIND_ENUM_CONSTANT(YIELD_WAIT);
}
@@ -597,7 +597,7 @@ static Ref<VisualScriptNode> create_yield_signal_node(const String &p_name) {
void register_visual_script_yield_nodes() {
VisualScriptLanguage::singleton->add_register_func("functions/wait/wait_frame", create_yield_node<VisualScriptYield::YIELD_FRAME>);
- VisualScriptLanguage::singleton->add_register_func("functions/wait/wait_fixed_frame", create_yield_node<VisualScriptYield::YIELD_FIXED_FRAME>);
+ VisualScriptLanguage::singleton->add_register_func("functions/wait/wait_physics_frame", create_yield_node<VisualScriptYield::YIELD_PHYSICS_FRAME>);
VisualScriptLanguage::singleton->add_register_func("functions/wait/wait_time", create_yield_node<VisualScriptYield::YIELD_WAIT>);
VisualScriptLanguage::singleton->add_register_func("functions/yield", create_yield_node<VisualScriptYield::YIELD_RETURN>);
diff --git a/modules/visual_script/visual_script_yield_nodes.h b/modules/visual_script/visual_script_yield_nodes.h
index d074962471..4a595a875a 100644
--- a/modules/visual_script/visual_script_yield_nodes.h
+++ b/modules/visual_script/visual_script_yield_nodes.h
@@ -39,7 +39,7 @@ public:
enum YieldMode {
YIELD_RETURN,
YIELD_FRAME,
- YIELD_FIXED_FRAME,
+ YIELD_PHYSICS_FRAME,
YIELD_WAIT
};