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.cpp2
-rw-r--r--modules/visual_script/visual_script.h2
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp22
-rw-r--r--modules/visual_script/visual_script_editor.cpp58
-rw-r--r--modules/visual_script/visual_script_editor.h2
-rw-r--r--modules/visual_script/visual_script_property_selector.cpp14
6 files changed, 50 insertions, 50 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index e712190344..762566e9ae 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -2584,7 +2584,7 @@ int VisualScriptLanguage::find_function(const String &p_function, const String &
return -1;
}
-String VisualScriptLanguage::make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const {
+String VisualScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const {
return String();
}
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index d3569bb040..cc77f9d891 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -599,7 +599,7 @@ public:
virtual bool has_named_classes() const;
virtual bool supports_builtin_mode() const;
virtual int find_function(const String &p_function, const String &p_code) const;
- virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
+ virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const;
virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const;
virtual void add_global_constant(const StringName &p_variable, const Variant &p_value);
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index 832c4c2cc4..e6c95c38b8 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -467,7 +467,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
case BYTES_TO_VAR: {
if (p_idx == 0)
- return PropertyInfo(Variant::POOL_BYTE_ARRAY, "bytes");
+ return PropertyInfo(Variant::PACKED_BYTE_ARRAY, "bytes");
else
return PropertyInfo(Variant::BOOL, "allow_objects");
} break;
@@ -632,7 +632,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
} break;
case VAR_TO_BYTES: {
if (p_idx == 0)
- t = Variant::POOL_BYTE_ARRAY;
+ t = Variant::PACKED_BYTE_ARRAY;
else
t = Variant::BOOL;
@@ -1228,7 +1228,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
r_error.expected = Variant::BOOL;
return;
}
- PoolByteArray barr;
+ PackedByteArray barr;
int len;
bool full_objects = *p_inputs[1];
Error err = encode_variant(*p_inputs[0], NULL, len, full_objects);
@@ -1242,17 +1242,17 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
barr.resize(len);
{
- PoolByteArray::Write w = barr.write();
- encode_variant(*p_inputs[0], w.ptr(), len, full_objects);
+ uint8_t *w = barr.ptrw();
+ encode_variant(*p_inputs[0], w, len, full_objects);
}
*r_return = barr;
} break;
case VisualScriptBuiltinFunc::BYTES_TO_VAR: {
- if (p_inputs[0]->get_type() != Variant::POOL_BYTE_ARRAY) {
+ if (p_inputs[0]->get_type() != Variant::PACKED_BYTE_ARRAY) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::POOL_BYTE_ARRAY;
+ r_error.expected = Variant::PACKED_BYTE_ARRAY;
return;
}
if (p_inputs[1]->get_type() != Variant::BOOL) {
@@ -1262,17 +1262,17 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
return;
}
- PoolByteArray varr = *p_inputs[0];
+ PackedByteArray varr = *p_inputs[0];
bool allow_objects = *p_inputs[1];
Variant ret;
{
- PoolByteArray::Read r = varr.read();
- Error err = decode_variant(ret, r.ptr(), varr.size(), NULL, allow_objects);
+ const uint8_t *r = varr.ptr();
+ Error err = decode_variant(ret, r, varr.size(), NULL, allow_objects);
if (err != OK) {
r_error_str = RTR("Not enough bytes for decoding bytes, or invalid format.");
r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
- r_error.expected = Variant::POOL_BYTE_ARRAY;
+ r_error.expected = Variant::PACKED_BYTE_ARRAY;
return;
}
}
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 9a1125c375..8725563c9b 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -366,13 +366,13 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::DICTIONARY: color = Color(0.47, 0.93, 0.69); break;
case Variant::ARRAY: color = Color(0.88, 0.88, 0.88); break;
- case Variant::POOL_BYTE_ARRAY: color = Color(0.67, 0.96, 0.78); break;
- case Variant::POOL_INT_ARRAY: color = Color(0.69, 0.86, 0.96); break;
- case Variant::POOL_REAL_ARRAY: color = Color(0.59, 0.91, 0.97); break;
- case Variant::POOL_STRING_ARRAY: color = Color(0.62, 0.77, 0.95); break;
- case Variant::POOL_VECTOR2_ARRAY: color = Color(0.82, 0.7, 0.96); break;
- case Variant::POOL_VECTOR3_ARRAY: color = Color(0.87, 0.61, 0.95); break;
- case Variant::POOL_COLOR_ARRAY: color = Color(0.91, 1.0, 0.59); break;
+ case Variant::PACKED_BYTE_ARRAY: color = Color(0.67, 0.96, 0.78); break;
+ case Variant::PACKED_INT_ARRAY: color = Color(0.69, 0.86, 0.96); break;
+ case Variant::PACKED_REAL_ARRAY: color = Color(0.59, 0.91, 0.97); break;
+ case Variant::PACKED_STRING_ARRAY: color = Color(0.62, 0.77, 0.95); break;
+ case Variant::PACKED_VECTOR2_ARRAY: color = Color(0.82, 0.7, 0.96); break;
+ case Variant::PACKED_VECTOR3_ARRAY: color = Color(0.87, 0.61, 0.95); break;
+ case Variant::PACKED_COLOR_ARRAY: color = Color(0.91, 1.0, 0.59); break;
default:
color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.7, 0.7);
@@ -403,13 +403,13 @@ static Color _color_from_type(Variant::Type p_type, bool dark_theme = true) {
case Variant::DICTIONARY: color = Color(0.34, 0.91, 0.62); break;
case Variant::ARRAY: color = Color(0.45, 0.45, 0.45); break;
- case Variant::POOL_BYTE_ARRAY: color = Color(0.38, 0.92, 0.6); break;
- case Variant::POOL_INT_ARRAY: color = Color(0.38, 0.73, 0.92); break;
- case Variant::POOL_REAL_ARRAY: color = Color(0.25, 0.83, 0.95); break;
- case Variant::POOL_STRING_ARRAY: color = Color(0.38, 0.62, 0.92); break;
- case Variant::POOL_VECTOR2_ARRAY: color = Color(0.62, 0.36, 0.92); break;
- case Variant::POOL_VECTOR3_ARRAY: color = Color(0.79, 0.35, 0.92); break;
- case Variant::POOL_COLOR_ARRAY: color = Color(0.57, 0.73, 0.0); break;
+ case Variant::PACKED_BYTE_ARRAY: color = Color(0.38, 0.92, 0.6); break;
+ case Variant::PACKED_INT_ARRAY: color = Color(0.38, 0.73, 0.92); break;
+ case Variant::PACKED_REAL_ARRAY: color = Color(0.25, 0.83, 0.95); break;
+ case Variant::PACKED_STRING_ARRAY: color = Color(0.38, 0.62, 0.92); break;
+ case Variant::PACKED_VECTOR2_ARRAY: color = Color(0.62, 0.36, 0.92); break;
+ case Variant::PACKED_VECTOR3_ARRAY: color = Color(0.79, 0.35, 0.92); break;
+ case Variant::PACKED_COLOR_ARRAY: color = Color(0.57, 0.73, 0.0); break;
default:
color.set_hsv(p_type / float(Variant::VARIANT_MAX), 0.3, 0.3);
@@ -520,13 +520,13 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Control::get_icon("MiniObject", "EditorIcons"),
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
- Control::get_icon("PoolByteArray", "EditorIcons"),
- Control::get_icon("PoolIntArray", "EditorIcons"),
- Control::get_icon("PoolRealArray", "EditorIcons"),
- Control::get_icon("PoolStringArray", "EditorIcons"),
- Control::get_icon("PoolVector2Array", "EditorIcons"),
- Control::get_icon("PoolVector3Array", "EditorIcons"),
- Control::get_icon("PoolColorArray", "EditorIcons")
+ Control::get_icon("PackedByteArray", "EditorIcons"),
+ Control::get_icon("PackedIntArray", "EditorIcons"),
+ Control::get_icon("PackedRealArray", "EditorIcons"),
+ Control::get_icon("PackedStringArray", "EditorIcons"),
+ Control::get_icon("PackedVector2Array", "EditorIcons"),
+ Control::get_icon("PackedVector3Array", "EditorIcons"),
+ Control::get_icon("PackedColorArray", "EditorIcons")
};
Ref<Texture2D> seq_port = Control::get_icon("VisualShaderPort", "EditorIcons");
@@ -976,13 +976,13 @@ void VisualScriptEditor::_update_members() {
Control::get_icon("MiniObject", "EditorIcons"),
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
- Control::get_icon("PoolByteArray", "EditorIcons"),
- Control::get_icon("PoolIntArray", "EditorIcons"),
- Control::get_icon("PoolRealArray", "EditorIcons"),
- Control::get_icon("PoolStringArray", "EditorIcons"),
- Control::get_icon("PoolVector2Array", "EditorIcons"),
- Control::get_icon("PoolVector3Array", "EditorIcons"),
- Control::get_icon("PoolColorArray", "EditorIcons")
+ Control::get_icon("PackedByteArray", "EditorIcons"),
+ Control::get_icon("PackedIntArray", "EditorIcons"),
+ Control::get_icon("PackedRealArray", "EditorIcons"),
+ Control::get_icon("PackedStringArray", "EditorIcons"),
+ Control::get_icon("PackedVector2Array", "EditorIcons"),
+ Control::get_icon("PackedVector3Array", "EditorIcons"),
+ Control::get_icon("PackedColorArray", "EditorIcons")
};
List<StringName> var_names;
@@ -2585,7 +2585,7 @@ void VisualScriptEditor::get_breakpoints(List<int> *p_breakpoints) {
}
}
-void VisualScriptEditor::add_callback(const String &p_function, PoolStringArray p_args) {
+void VisualScriptEditor::add_callback(const String &p_function, PackedStringArray p_args) {
if (script->has_function(p_function)) {
_update_members();
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index 9f52d87b6a..9a2a42b160 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -313,7 +313,7 @@ public:
virtual void tag_saved_version();
virtual void reload(bool p_soft);
virtual void get_breakpoints(List<int> *p_breakpoints);
- virtual void add_callback(const String &p_function, PoolStringArray p_args);
+ virtual void add_callback(const String &p_function, PackedStringArray p_args);
virtual void update_settings();
virtual bool show_members_overview();
virtual void set_debugger_active(bool p_active);
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp
index e8c02a41c4..ffcd355fa0 100644
--- a/modules/visual_script/visual_script_property_selector.cpp
+++ b/modules/visual_script/visual_script_property_selector.cpp
@@ -119,13 +119,13 @@ void VisualScriptPropertySelector::_update_search() {
Control::get_icon("Object", "EditorIcons"),
Control::get_icon("Dictionary", "EditorIcons"),
Control::get_icon("Array", "EditorIcons"),
- Control::get_icon("PoolByteArray", "EditorIcons"),
- Control::get_icon("PoolIntArray", "EditorIcons"),
- Control::get_icon("PoolRealArray", "EditorIcons"),
- Control::get_icon("PoolStringArray", "EditorIcons"),
- Control::get_icon("PoolVector2Array", "EditorIcons"),
- Control::get_icon("PoolVector3Array", "EditorIcons"),
- Control::get_icon("PoolColorArray", "EditorIcons")
+ Control::get_icon("PackedByteArray", "EditorIcons"),
+ Control::get_icon("PackedIntArray", "EditorIcons"),
+ Control::get_icon("PackedRealArray", "EditorIcons"),
+ Control::get_icon("PackedStringArray", "EditorIcons"),
+ Control::get_icon("PackedVector2Array", "EditorIcons"),
+ Control::get_icon("PackedVector3Array", "EditorIcons"),
+ Control::get_icon("PackedColorArray", "EditorIcons")
};
{
String b = String(E->get());