diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/animation_track_editor.cpp | 9 | ||||
-rw-r--r-- | editor/connections_dialog.cpp | 3 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_node.cpp | 4 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_node.h | 2 | ||||
-rw-r--r-- | editor/debugger/script_editor_debugger.cpp | 16 | ||||
-rw-r--r-- | editor/debugger/script_editor_debugger.h | 2 | ||||
-rw-r--r-- | editor/editor_inspector.cpp | 6 | ||||
-rw-r--r-- | editor/editor_properties.cpp | 2 |
8 files changed, 19 insertions, 25 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 6586fcd5ce..81a2d90b70 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -606,8 +606,7 @@ public: } break; case Animation::TYPE_METHOD: { p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name")); - static_assert(VARIANT_ARG_MAX == 8, "PROPERTY_HINT_RANGE needs to be updated if VARIANT_ARG_MAX != 8"); - p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,8,1")); + p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,32,1,or_greater")); Dictionary d = animation->track_get_key_value(track, key); ERR_FAIL_COND(!d.has("args")); @@ -1287,8 +1286,8 @@ public: } break; case Animation::TYPE_METHOD: { p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name")); - static_assert(VARIANT_ARG_MAX == 8, "PROPERTY_HINT_RANGE needs to be updated if VARIANT_ARG_MAX != 8"); - p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,8,1")); + + p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,32,1,or_greater")); Dictionary d = animation->track_get_key_value(first_track, first_key); ERR_FAIL_COND(!d.has("args")); @@ -3189,7 +3188,7 @@ AnimationTrackEdit *AnimationTrackEditPlugin::create_value_track_edit(Object *p_ }; Callable::CallError ce; - return Object::cast_to<AnimationTrackEdit>(get_script_instance()->call("create_value_track_edit", (const Variant **)&argptrs, 6, ce).operator Object *()); + return Object::cast_to<AnimationTrackEdit>(get_script_instance()->callp("create_value_track_edit", (const Variant **)&argptrs, 6, ce).operator Object *()); } return nullptr; } diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index df2a66f182..0f8667f81a 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -180,9 +180,6 @@ void ConnectDialog::_unbind_count_changed(double p_count) { * Adds a new parameter bind to connection. */ void ConnectDialog::_add_bind() { - if (cdbinds->params.size() >= VARIANT_ARG_MAX) { - return; - } Variant::Type vt = (Variant::Type)type_list->get_item_id(type_list->get_selected()); Variant value; diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index d5a4f5d138..1a7b11d888 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -610,12 +610,12 @@ void EditorDebuggerNode::_save_node_requested(ObjectID p_id, const String &p_fil } // Remote inspector/edit. -void EditorDebuggerNode::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) { +void EditorDebuggerNode::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, const Variant **p_args, int p_argcount) { if (!singleton) { return; } _for_all(singleton->tabs, [&](ScriptEditorDebugger *dbg) { - dbg->_method_changed(p_base, p_name, VARIANT_ARG_PASS); + dbg->_method_changed(p_base, p_name, p_args, p_argcount); }); } diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h index 6fcdbf5f73..36f99113ad 100644 --- a/editor/debugger/editor_debugger_node.h +++ b/editor/debugger/editor_debugger_node.h @@ -171,7 +171,7 @@ public: // Remote inspector/edit. void request_remote_tree(); - static void _method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE); + static void _method_changeds(void *p_ud, Object *p_base, const StringName &p_name, const Variant **p_args, int p_argcount); static void _property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value); // LiveDebug diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 0b9631c816..453e9e3a0c 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -1064,18 +1064,16 @@ int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) { return last_path_id; } -void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) { +void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, const Variant **p_args, int p_argcount) { if (!p_base || !live_debug || !is_session_active() || !EditorNode::get_singleton()->get_edited_scene()) { return; } Node *node = Object::cast_to<Node>(p_base); - VARIANT_ARGPTRS - - for (int i = 0; i < VARIANT_ARG_MAX; i++) { + for (int i = 0; i < p_argcount; i++) { //no pointers, sorry - if (argptr[i] && (argptr[i]->get_type() == Variant::OBJECT || argptr[i]->get_type() == Variant::RID)) { + if (p_args[i]->get_type() == Variant::OBJECT || p_args[i]->get_type() == Variant::RID) { return; } } @@ -1087,9 +1085,9 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n Array msg; msg.push_back(pathid); msg.push_back(p_name); - for (int i = 0; i < VARIANT_ARG_MAX; i++) { + for (int i = 0; i < p_argcount; i++) { //no pointers, sorry - msg.push_back(*argptr[i]); + msg.push_back(*p_args[i]); } _put_msg("scene:live_node_call", msg); @@ -1105,9 +1103,9 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n Array msg; msg.push_back(pathid); msg.push_back(p_name); - for (int i = 0; i < VARIANT_ARG_MAX; i++) { + for (int i = 0; i < p_argcount; i++) { //no pointers, sorry - msg.push_back(*argptr[i]); + msg.push_back(*p_args[i]); } _put_msg("scene:live_res_call", msg); diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index e4d3a2fa09..486ac26ef7 100644 --- a/editor/debugger/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -187,7 +187,7 @@ private: void _live_edit_set(); void _live_edit_clear(); - void _method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE); + void _method_changed(Object *p_base, const StringName &p_name, const Variant **p_args, int p_argcount); void _property_changed(Object *p_base, const StringName &p_property, const Variant &p_value); void _error_activated(); diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index a83379dca4..d48ca7f3b3 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -99,7 +99,7 @@ void EditorProperty::emit_changed(const StringName &p_property, const Variant &p const Variant *argptrs[4] = { &args[0], &args[1], &args[2], &args[3] }; cache[p_property] = p_value; - emit_signal(SNAME("property_changed"), (const Variant **)argptrs, 4); + emit_signalp(SNAME("property_changed"), (const Variant **)argptrs, 4); } void EditorProperty::_notification(int p_what) { @@ -3314,7 +3314,7 @@ void EditorInspector::_property_keyed(const String &p_path, bool p_advance) { // The second parameter could be null, causing the event to fire with less arguments, so use the pointer call which preserves it. const Variant args[3] = { p_path, object->get(p_path), p_advance }; const Variant *argp[3] = { &args[0], &args[1], &args[2] }; - emit_signal(SNAME("property_keyed"), argp, 3); + emit_signalp(SNAME("property_keyed"), argp, 3); } void EditorInspector::_property_deleted(const String &p_path) { @@ -3333,7 +3333,7 @@ void EditorInspector::_property_keyed_with_value(const String &p_path, const Var // The second parameter could be null, causing the event to fire with less arguments, so use the pointer call which preserves it. const Variant args[3] = { p_path, p_value, p_advance }; const Variant *argp[3] = { &args[0], &args[1], &args[2] }; - emit_signal(SNAME("property_keyed"), argp, 3); + emit_signalp(SNAME("property_keyed"), argp, 3); } void EditorInspector::_property_checked(const String &p_path, bool p_checked) { diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index d93d495ff6..1a4d507eef 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -3059,7 +3059,7 @@ void EditorPropertyResource::_sub_inspector_property_keyed(const String &p_prope // The second parameter could be null, causing the event to fire with less arguments, so use the pointer call which preserves it. const Variant args[3] = { String(get_edited_property()) + ":" + p_property, p_value, p_advance }; const Variant *argp[3] = { &args[0], &args[1], &args[2] }; - emit_signal(SNAME("property_keyed_with_value"), argp, 3); + emit_signalp(SNAME("property_keyed_with_value"), argp, 3); } void EditorPropertyResource::_sub_inspector_resource_selected(const RES &p_resource, const String &p_property) { |