Browse Source

Merge pull request #44143 from KoBeWi/callable_multiplayer

Rémi Verschelde 2 years ago
parent
commit
e5594c26b1

+ 2 - 2
editor/animation_bezier_editor.cpp

@@ -667,8 +667,8 @@ void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
 
 
 void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
 void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
 	editor = p_editor;
 	editor = p_editor;
-	connect("clear_selection", Callable(editor, "_clear_selection").bind(false));
-	connect("select_key", Callable(editor, "_key_selected"), CONNECT_DEFERRED);
+	connect("clear_selection", callable_mp(editor, &AnimationTrackEditor::_clear_selection).bind(false));
+	connect("select_key", callable_mp(editor, &AnimationTrackEditor::_key_selected), CONNECT_DEFERRED);
 }
 }
 
 
 void AnimationBezierTrackEdit::_play_position_draw() {
 void AnimationBezierTrackEdit::_play_position_draw() {

+ 5 - 13
editor/animation_track_editor.cpp

@@ -3424,9 +3424,6 @@ void AnimationTrackEditGroup::_zoom_changed() {
 	queue_redraw();
 	queue_redraw();
 }
 }
 
 
-void AnimationTrackEditGroup::_bind_methods() {
-}
-
 AnimationTrackEditGroup::AnimationTrackEditGroup() {
 AnimationTrackEditGroup::AnimationTrackEditGroup() {
 	set_mouse_filter(MOUSE_FILTER_PASS);
 	set_mouse_filter(MOUSE_FILTER_PASS);
 }
 }
@@ -6461,16 +6458,11 @@ void AnimationTrackEditor::_select_all_tracks_for_copy() {
 }
 }
 
 
 void AnimationTrackEditor::_bind_methods() {
 void AnimationTrackEditor::_bind_methods() {
-	ClassDB::bind_method(D_METHOD("_animation_update"), &AnimationTrackEditor::_animation_update);
-	ClassDB::bind_method(D_METHOD("_track_grab_focus"), &AnimationTrackEditor::_track_grab_focus);
-	ClassDB::bind_method(D_METHOD("_update_tracks"), &AnimationTrackEditor::_update_tracks);
-	ClassDB::bind_method(D_METHOD("_redraw_tracks"), &AnimationTrackEditor::_redraw_tracks);
-	ClassDB::bind_method(D_METHOD("_clear_selection_for_anim"), &AnimationTrackEditor::_clear_selection_for_anim);
-	ClassDB::bind_method(D_METHOD("_select_at_anim"), &AnimationTrackEditor::_select_at_anim);
-
-	ClassDB::bind_method(D_METHOD("_key_selected"), &AnimationTrackEditor::_key_selected); // Still used by some connect_compat.
-	ClassDB::bind_method(D_METHOD("_key_deselected"), &AnimationTrackEditor::_key_deselected); // Still used by some connect_compat.
-	ClassDB::bind_method(D_METHOD("_clear_selection"), &AnimationTrackEditor::_clear_selection); // Still used by some connect_compat.
+	ClassDB::bind_method("_animation_update", &AnimationTrackEditor::_animation_update);
+	ClassDB::bind_method("_track_grab_focus", &AnimationTrackEditor::_track_grab_focus);
+	ClassDB::bind_method("_clear_selection_for_anim", &AnimationTrackEditor::_clear_selection_for_anim);
+	ClassDB::bind_method("_select_at_anim", &AnimationTrackEditor::_select_at_anim);
+	ClassDB::bind_method("_clear_selection", &AnimationTrackEditor::_clear_selection);
 
 
 	ClassDB::bind_method(D_METHOD("_bezier_track_set_key_handle_mode", "animation", "track_idx", "key_idx", "key_handle_mode", "key_handle_set_mode"), &AnimationTrackEditor::_bezier_track_set_key_handle_mode, DEFVAL(Animation::HANDLE_SET_MODE_NONE));
 	ClassDB::bind_method(D_METHOD("_bezier_track_set_key_handle_mode", "animation", "track_idx", "key_idx", "key_handle_mode", "key_handle_set_mode"), &AnimationTrackEditor::_bezier_track_set_key_handle_mode, DEFVAL(Animation::HANDLE_SET_MODE_NONE));
 
 

+ 5 - 5
editor/animation_track_editor.h

@@ -280,7 +280,6 @@ class AnimationTrackEditGroup : public Control {
 	void _zoom_changed();
 	void _zoom_changed();
 
 
 protected:
 protected:
-	static void _bind_methods();
 	void _notification(int p_what);
 	void _notification(int p_what);
 
 
 public:
 public:
@@ -407,7 +406,6 @@ class AnimationTrackEditor : public VBoxContainer {
 	void _insert_key_from_track(float p_ofs, int p_track);
 	void _insert_key_from_track(float p_ofs, int p_track);
 	void _add_method_key(const String &p_method);
 	void _add_method_key(const String &p_method);
 
 
-	void _clear_selection(bool p_update = false);
 	void _clear_selection_for_anim(const Ref<Animation> &p_anim);
 	void _clear_selection_for_anim(const Ref<Animation> &p_anim);
 	void _select_at_anim(const Ref<Animation> &p_anim, int p_track, float p_pos);
 	void _select_at_anim(const Ref<Animation> &p_anim, int p_track, float p_pos);
 
 
@@ -425,9 +423,6 @@ class AnimationTrackEditor : public VBoxContainer {
 
 
 	RBMap<SelectedKey, KeyInfo> selection;
 	RBMap<SelectedKey, KeyInfo> selection;
 
 
-	void _key_selected(int p_key, bool p_single, int p_track);
-	void _key_deselected(int p_key, int p_track);
-
 	bool moving_selection = false;
 	bool moving_selection = false;
 	float moving_selection_offset = 0.0f;
 	float moving_selection_offset = 0.0f;
 	void _move_selection_begin();
 	void _move_selection_begin();
@@ -531,6 +526,11 @@ protected:
 	void _notification(int p_what);
 	void _notification(int p_what);
 
 
 public:
 public:
+	// Public for use with callable_mp.
+	void _clear_selection(bool p_update = false);
+	void _key_selected(int p_key, bool p_single, int p_track);
+	void _key_deselected(int p_key, int p_track);
+
 	enum {
 	enum {
 		EDIT_COPY_TRACKS,
 		EDIT_COPY_TRACKS,
 		EDIT_COPY_TRACKS_CONFIRM,
 		EDIT_COPY_TRACKS_CONFIRM,

+ 1 - 1
editor/connections_dialog.cpp

@@ -810,7 +810,7 @@ void ConnectionsDock::_go_to_script(TreeItem &p_item) {
 	}
 	}
 
 
 	if (script.is_valid() && ScriptEditor::get_singleton()->script_goto_method(script, cd.method)) {
 	if (script.is_valid() && ScriptEditor::get_singleton()->script_goto_method(script, cd.method)) {
-		EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT);
+		EditorNode::get_singleton()->editor_select(EditorNode::EDITOR_SCRIPT);
 	}
 	}
 }
 }
 
 

+ 3 - 1
editor/editor_file_dialog.h

@@ -202,7 +202,6 @@ private:
 
 
 	void _select_drive(int p_idx);
 	void _select_drive(int p_idx);
 	void _dir_submitted(String p_dir);
 	void _dir_submitted(String p_dir);
-	void _file_submitted(const String &p_file);
 	void _action_pressed();
 	void _action_pressed();
 	void _save_confirm_pressed();
 	void _save_confirm_pressed();
 	void _cancel_pressed();
 	void _cancel_pressed();
@@ -240,6 +239,9 @@ protected:
 	static void _bind_methods();
 	static void _bind_methods();
 
 
 public:
 public:
+	// Public for use with callable_mp.
+	void _file_submitted(const String &p_file);
+
 	void popup_file_dialog();
 	void popup_file_dialog();
 	void clear_filters();
 	void clear_filters();
 	void add_filter(const String &p_filter, const String &p_description = "");
 	void add_filter(const String &p_filter, const String &p_description = "");

+ 18 - 30
editor/editor_node.cpp

@@ -465,15 +465,15 @@ void EditorNode::shortcut_input(const Ref<InputEvent> &p_event) {
 		}
 		}
 
 
 		if (ED_IS_SHORTCUT("editor/editor_2d", p_event)) {
 		if (ED_IS_SHORTCUT("editor/editor_2d", p_event)) {
-			_editor_select(EDITOR_2D);
+			editor_select(EDITOR_2D);
 		} else if (ED_IS_SHORTCUT("editor/editor_3d", p_event)) {
 		} else if (ED_IS_SHORTCUT("editor/editor_3d", p_event)) {
-			_editor_select(EDITOR_3D);
+			editor_select(EDITOR_3D);
 		} else if (ED_IS_SHORTCUT("editor/editor_script", p_event)) {
 		} else if (ED_IS_SHORTCUT("editor/editor_script", p_event)) {
-			_editor_select(EDITOR_SCRIPT);
+			editor_select(EDITOR_SCRIPT);
 		} else if (ED_IS_SHORTCUT("editor/editor_help", p_event)) {
 		} else if (ED_IS_SHORTCUT("editor/editor_help", p_event)) {
 			emit_signal(SNAME("request_help_search"), "");
 			emit_signal(SNAME("request_help_search"), "");
 		} else if (ED_IS_SHORTCUT("editor/editor_assetlib", p_event) && AssetLibraryEditorPlugin::is_available()) {
 		} else if (ED_IS_SHORTCUT("editor/editor_assetlib", p_event) && AssetLibraryEditorPlugin::is_available()) {
-			_editor_select(EDITOR_ASSETLIB);
+			editor_select(EDITOR_ASSETLIB);
 		} else if (ED_IS_SHORTCUT("editor/editor_next", p_event)) {
 		} else if (ED_IS_SHORTCUT("editor/editor_next", p_event)) {
 			_editor_select_next();
 			_editor_select_next();
 		} else if (ED_IS_SHORTCUT("editor/editor_prev", p_event)) {
 		} else if (ED_IS_SHORTCUT("editor/editor_prev", p_event)) {
@@ -584,7 +584,7 @@ void EditorNode::_update_from_settings() {
 void EditorNode::_select_default_main_screen_plugin() {
 void EditorNode::_select_default_main_screen_plugin() {
 	if (EDITOR_3D < main_editor_buttons.size() && main_editor_buttons[EDITOR_3D]->is_visible()) {
 	if (EDITOR_3D < main_editor_buttons.size() && main_editor_buttons[EDITOR_3D]->is_visible()) {
 		// If the 3D editor is enabled, use this as the default.
 		// If the 3D editor is enabled, use this as the default.
-		_editor_select(EDITOR_3D);
+		editor_select(EDITOR_3D);
 		return;
 		return;
 	}
 	}
 
 
@@ -593,12 +593,12 @@ void EditorNode::_select_default_main_screen_plugin() {
 	for (int i = 0; i < main_editor_buttons.size(); i++) {
 	for (int i = 0; i < main_editor_buttons.size(); i++) {
 		Button *editor_button = main_editor_buttons[i];
 		Button *editor_button = main_editor_buttons[i];
 		if (editor_button->is_visible()) {
 		if (editor_button->is_visible()) {
-			_editor_select(i);
+			editor_select(i);
 			return;
 			return;
 		}
 		}
 	}
 	}
 
 
-	_editor_select(-1);
+	editor_select(-1);
 }
 }
 
 
 void EditorNode::_notification(int p_what) {
 void EditorNode::_notification(int p_what) {
@@ -1190,7 +1190,7 @@ void EditorNode::_editor_select_next() {
 		}
 		}
 	} while (!main_editor_buttons[editor]->is_visible());
 	} while (!main_editor_buttons[editor]->is_visible());
 
 
-	_editor_select(editor);
+	editor_select(editor);
 }
 }
 
 
 void EditorNode::_open_command_palette() {
 void EditorNode::_open_command_palette() {
@@ -1208,7 +1208,7 @@ void EditorNode::_editor_select_prev() {
 		}
 		}
 	} while (!main_editor_buttons[editor]->is_visible());
 	} while (!main_editor_buttons[editor]->is_visible());
 
 
-	_editor_select(editor);
+	editor_select(editor);
 }
 }
 
 
 Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_deps) {
 Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_deps) {
@@ -2390,7 +2390,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
 
 
 			else if (main_plugin != editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) {
 			else if (main_plugin != editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) {
 				// Update screen main_plugin.
 				// Update screen main_plugin.
-				_editor_select(plugin_index);
+				editor_select(plugin_index);
 				main_plugin->edit(current_obj);
 				main_plugin->edit(current_obj);
 			} else {
 			} else {
 				editor_plugin_screen->edit(current_obj);
 				editor_plugin_screen->edit(current_obj);
@@ -3305,7 +3305,7 @@ VBoxContainer *EditorNode::get_main_screen_control() {
 	return main_screen_vbox;
 	return main_screen_vbox;
 }
 }
 
 
-void EditorNode::_editor_select(int p_which) {
+void EditorNode::editor_select(int p_which) {
 	static bool selecting = false;
 	static bool selecting = false;
 	if (selecting || changing_scene) {
 	if (selecting || changing_scene) {
 		return;
 		return;
@@ -3359,7 +3359,7 @@ void EditorNode::select_editor_by_name(const String &p_name) {
 
 
 	for (int i = 0; i < main_editor_buttons.size(); i++) {
 	for (int i = 0; i < main_editor_buttons.size(); i++) {
 		if (main_editor_buttons[i]->get_text() == p_name) {
 		if (main_editor_buttons[i]->get_text() == p_name) {
-			_editor_select(i);
+			editor_select(i);
 			return;
 			return;
 		}
 		}
 	}
 	}
@@ -3372,7 +3372,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
 		Button *tb = memnew(Button);
 		Button *tb = memnew(Button);
 		tb->set_flat(true);
 		tb->set_flat(true);
 		tb->set_toggle_mode(true);
 		tb->set_toggle_mode(true);
-		tb->connect("pressed", callable_mp(singleton, &EditorNode::_editor_select).bind(singleton->main_editor_buttons.size()));
+		tb->connect("pressed", callable_mp(singleton, &EditorNode::editor_select).bind(singleton->main_editor_buttons.size()));
 		tb->set_name(p_editor->get_name());
 		tb->set_name(p_editor->get_name());
 		tb->set_text(p_editor->get_name());
 		tb->set_text(p_editor->get_name());
 
 
@@ -3406,7 +3406,7 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
 		for (int i = 0; i < singleton->main_editor_buttons.size(); i++) {
 		for (int i = 0; i < singleton->main_editor_buttons.size(); i++) {
 			if (p_editor->get_name() == singleton->main_editor_buttons[i]->get_text()) {
 			if (p_editor->get_name() == singleton->main_editor_buttons[i]->get_text()) {
 				if (singleton->main_editor_buttons[i]->is_pressed()) {
 				if (singleton->main_editor_buttons[i]->is_pressed()) {
-					singleton->_editor_select(EDITOR_SCRIPT);
+					singleton->editor_select(EDITOR_SCRIPT);
 				}
 				}
 
 
 				memdelete(singleton->main_editor_buttons[i]);
 				memdelete(singleton->main_editor_buttons[i]);
@@ -3630,7 +3630,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
 		int index = p_state["editor_index"];
 		int index = p_state["editor_index"];
 		if (current < 2) { // If currently in spatial/2d, only switch to spatial/2d. If currently in script, stay there.
 		if (current < 2) { // If currently in spatial/2d, only switch to spatial/2d. If currently in script, stay there.
 			if (index < 2 || !get_edited_scene()) {
 			if (index < 2 || !get_edited_scene()) {
-				_editor_select(index);
+				editor_select(index);
 			}
 			}
 		}
 		}
 	}
 	}
@@ -3641,9 +3641,9 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
 			int n2d = 0, n3d = 0;
 			int n2d = 0, n3d = 0;
 			_find_node_types(get_edited_scene(), n2d, n3d);
 			_find_node_types(get_edited_scene(), n2d, n3d);
 			if (n2d > n3d) {
 			if (n2d > n3d) {
-				_editor_select(EDITOR_2D);
+				editor_select(EDITOR_2D);
 			} else if (n3d > n2d) {
 			} else if (n3d > n2d) {
-				_editor_select(EDITOR_3D);
+				editor_select(EDITOR_3D);
 			}
 			}
 		}
 		}
 	}
 	}
@@ -5935,7 +5935,7 @@ void EditorNode::_feature_profile_changed() {
 		if ((profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D) && singleton->main_editor_buttons[EDITOR_3D]->is_pressed()) ||
 		if ((profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D) && singleton->main_editor_buttons[EDITOR_3D]->is_pressed()) ||
 				(profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT) && singleton->main_editor_buttons[EDITOR_SCRIPT]->is_pressed()) ||
 				(profile->is_feature_disabled(EditorFeatureProfile::FEATURE_SCRIPT) && singleton->main_editor_buttons[EDITOR_SCRIPT]->is_pressed()) ||
 				(AssetLibraryEditorPlugin::is_available() && profile->is_feature_disabled(EditorFeatureProfile::FEATURE_ASSET_LIB) && singleton->main_editor_buttons[EDITOR_ASSETLIB]->is_pressed())) {
 				(AssetLibraryEditorPlugin::is_available() && profile->is_feature_disabled(EditorFeatureProfile::FEATURE_ASSET_LIB) && singleton->main_editor_buttons[EDITOR_ASSETLIB]->is_pressed())) {
-			_editor_select(EDITOR_2D);
+			editor_select(EDITOR_2D);
 		}
 		}
 	} else {
 	} else {
 		import_tabs->set_tab_hidden(import_tabs->get_tab_idx_from_control(ImportDock::get_singleton()), false);
 		import_tabs->set_tab_hidden(import_tabs->get_tab_idx_from_control(ImportDock::get_singleton()), false);
@@ -5958,19 +5958,14 @@ void EditorNode::_bind_methods() {
 	GLOBAL_DEF("editor/scene/scene_naming", SCENE_NAME_CASING_SNAKE_CASE);
 	GLOBAL_DEF("editor/scene/scene_naming", SCENE_NAME_CASING_SNAKE_CASE);
 	ProjectSettings::get_singleton()->set_custom_property_info("editor/scene/scene_naming", PropertyInfo(Variant::INT, "editor/scene/scene_naming", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"));
 	ProjectSettings::get_singleton()->set_custom_property_info("editor/scene/scene_naming", PropertyInfo(Variant::INT, "editor/scene/scene_naming", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"));
 	ClassDB::bind_method("edit_current", &EditorNode::edit_current);
 	ClassDB::bind_method("edit_current", &EditorNode::edit_current);
-	ClassDB::bind_method("_editor_select", &EditorNode::_editor_select);
-	ClassDB::bind_method("_node_renamed", &EditorNode::_node_renamed);
 	ClassDB::bind_method("edit_node", &EditorNode::edit_node);
 	ClassDB::bind_method("edit_node", &EditorNode::edit_node);
 
 
 	ClassDB::bind_method(D_METHOD("push_item", "object", "property", "inspector_only"), &EditorNode::push_item, DEFVAL(""), DEFVAL(false));
 	ClassDB::bind_method(D_METHOD("push_item", "object", "property", "inspector_only"), &EditorNode::push_item, DEFVAL(""), DEFVAL(false));
 
 
-	ClassDB::bind_method("_get_scene_metadata", &EditorNode::_get_scene_metadata);
 	ClassDB::bind_method("set_edited_scene", &EditorNode::set_edited_scene);
 	ClassDB::bind_method("set_edited_scene", &EditorNode::set_edited_scene);
 	ClassDB::bind_method("open_request", &EditorNode::open_request);
 	ClassDB::bind_method("open_request", &EditorNode::open_request);
 	ClassDB::bind_method("edit_foreign_resource", &EditorNode::edit_foreign_resource);
 	ClassDB::bind_method("edit_foreign_resource", &EditorNode::edit_foreign_resource);
 	ClassDB::bind_method("is_resource_read_only", &EditorNode::is_resource_read_only);
 	ClassDB::bind_method("is_resource_read_only", &EditorNode::is_resource_read_only);
-	ClassDB::bind_method("_close_messages", &EditorNode::_close_messages);
-	ClassDB::bind_method("_show_messages", &EditorNode::_show_messages);
 
 
 	ClassDB::bind_method("stop_child_process", &EditorNode::stop_child_process);
 	ClassDB::bind_method("stop_child_process", &EditorNode::stop_child_process);
 
 
@@ -5983,13 +5978,6 @@ void EditorNode::_bind_methods() {
 
 
 	ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
 	ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
 
 
-	ClassDB::bind_method(D_METHOD("_on_plugin_ready"), &EditorNode::_on_plugin_ready); // Still used by some connect_compat.
-
-	ClassDB::bind_method("_screenshot", &EditorNode::_screenshot);
-	ClassDB::bind_method("_save_screenshot", &EditorNode::_save_screenshot);
-
-	ClassDB::bind_method("_version_button_pressed", &EditorNode::_version_button_pressed);
-
 	ADD_SIGNAL(MethodInfo("play_pressed"));
 	ADD_SIGNAL(MethodInfo("play_pressed"));
 	ADD_SIGNAL(MethodInfo("pause_pressed"));
 	ADD_SIGNAL(MethodInfo("pause_pressed"));
 	ADD_SIGNAL(MethodInfo("stop_pressed"));
 	ADD_SIGNAL(MethodInfo("stop_pressed"));

+ 5 - 3
editor/editor_node.h

@@ -543,7 +543,6 @@ private:
 	void _update_file_menu_opened();
 	void _update_file_menu_opened();
 	void _update_file_menu_closed();
 	void _update_file_menu_closed();
 
 
-	void _on_plugin_ready(Object *p_script, const String &p_activate_name);
 	void _remove_plugin_from_enabled(const String &p_name);
 	void _remove_plugin_from_enabled(const String &p_name);
 
 
 	void _fs_changed();
 	void _fs_changed();
@@ -553,7 +552,6 @@ private:
 	void _node_renamed();
 	void _node_renamed();
 	void _editor_select_next();
 	void _editor_select_next();
 	void _editor_select_prev();
 	void _editor_select_prev();
-	void _editor_select(int p_which);
 	void _set_scene_metadata(const String &p_file, int p_idx = -1);
 	void _set_scene_metadata(const String &p_file, int p_idx = -1);
 	void _get_scene_metadata(const String &p_file);
 	void _get_scene_metadata(const String &p_file);
 	void _update_title();
 	void _update_title();
@@ -701,7 +699,11 @@ protected:
 	void set_current_tab(int p_tab);
 	void set_current_tab(int p_tab);
 
 
 public:
 public:
-	void set_visible_editor(EditorTable p_table) { _editor_select(p_table); }
+	// Public for use with callable_mp.
+	void _on_plugin_ready(Object *p_script, const String &p_activate_name);
+
+	void editor_select(int p_which);
+	void set_visible_editor(EditorTable p_table) { editor_select(p_table); }
 
 
 	bool call_build();
 	bool call_build();
 
 

+ 1 - 1
editor/editor_plugin_settings.cpp

@@ -46,7 +46,7 @@ void EditorPluginSettings::_notification(int p_what) {
 		} break;
 		} break;
 
 
 		case Node::NOTIFICATION_READY: {
 		case Node::NOTIFICATION_READY: {
-			plugin_config_dialog->connect("plugin_ready", Callable(EditorNode::get_singleton(), "_on_plugin_ready"));
+			plugin_config_dialog->connect("plugin_ready", callable_mp(EditorNode::get_singleton(), &EditorNode::_on_plugin_ready));
 			plugin_list->connect("button_clicked", callable_mp(this, &EditorPluginSettings::_cell_button_pressed));
 			plugin_list->connect("button_clicked", callable_mp(this, &EditorPluginSettings::_cell_button_pressed));
 		} break;
 		} break;
 	}
 	}

+ 4 - 4
editor/export/project_export.cpp

@@ -865,10 +865,10 @@ void ProjectExportDialog::_validate_export_path(const String &p_path) {
 
 
 	if (invalid_path) {
 	if (invalid_path) {
 		export_project->get_ok_button()->set_disabled(true);
 		export_project->get_ok_button()->set_disabled(true);
-		export_project->get_line_edit()->disconnect("text_submitted", Callable(export_project, "_file_submitted"));
+		export_project->get_line_edit()->disconnect("text_submitted", callable_mp(export_project, &EditorFileDialog::_file_submitted));
 	} else {
 	} else {
 		export_project->get_ok_button()->set_disabled(false);
 		export_project->get_ok_button()->set_disabled(false);
-		export_project->get_line_edit()->connect("text_submitted", Callable(export_project, "_file_submitted"));
+		export_project->get_line_edit()->connect("text_submitted", callable_mp(export_project, &EditorFileDialog::_file_submitted));
 	}
 	}
 }
 }
 
 
@@ -901,9 +901,9 @@ void ProjectExportDialog::_export_project() {
 	// with _validate_export_path.
 	// with _validate_export_path.
 	// FIXME: This is a hack, we should instead change EditorFileDialog to allow
 	// FIXME: This is a hack, we should instead change EditorFileDialog to allow
 	// disabling validation by the "text_submitted" signal.
 	// disabling validation by the "text_submitted" signal.
-	if (!export_project->get_line_edit()->is_connected("text_submitted", Callable(export_project, "_file_submitted"))) {
+	if (!export_project->get_line_edit()->is_connected("text_submitted", callable_mp(export_project, &EditorFileDialog::_file_submitted))) {
 		export_project->get_ok_button()->set_disabled(false);
 		export_project->get_ok_button()->set_disabled(false);
-		export_project->get_line_edit()->connect("text_submitted", Callable(export_project, "_file_submitted"));
+		export_project->get_line_edit()->connect("text_submitted", callable_mp(export_project, &EditorFileDialog::_file_submitted));
 	}
 	}
 
 
 	export_project->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
 	export_project->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);

+ 2 - 7
editor/plugins/canvas_item_editor_plugin.cpp

@@ -4715,12 +4715,10 @@ void CanvasItemEditor::_reset_drag() {
 }
 }
 
 
 void CanvasItemEditor::_bind_methods() {
 void CanvasItemEditor::_bind_methods() {
-	ClassDB::bind_method(D_METHOD("_update_override_camera_button", "game_running"), &CanvasItemEditor::_update_override_camera_button);
 	ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data);
 	ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data);
 
 
 	ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state);
 	ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state);
 	ClassDB::bind_method(D_METHOD("update_viewport"), &CanvasItemEditor::update_viewport);
 	ClassDB::bind_method(D_METHOD("update_viewport"), &CanvasItemEditor::update_viewport);
-	ClassDB::bind_method(D_METHOD("_zoom_on_position"), &CanvasItemEditor::_zoom_on_position);
 
 
 	ClassDB::bind_method("_set_owner_for_node_and_children", &CanvasItemEditor::_set_owner_for_node_and_children);
 	ClassDB::bind_method("_set_owner_for_node_and_children", &CanvasItemEditor::_set_owner_for_node_and_children);
 
 
@@ -4984,8 +4982,8 @@ CanvasItemEditor::CanvasItemEditor() {
 	SceneTreeDock::get_singleton()->connect("node_created", callable_mp(this, &CanvasItemEditor::_node_created));
 	SceneTreeDock::get_singleton()->connect("node_created", callable_mp(this, &CanvasItemEditor::_node_created));
 	SceneTreeDock::get_singleton()->connect("add_node_used", callable_mp(this, &CanvasItemEditor::_reset_create_position));
 	SceneTreeDock::get_singleton()->connect("add_node_used", callable_mp(this, &CanvasItemEditor::_reset_create_position));
 
 
-	EditorNode::get_singleton()->call_deferred(SNAME("connect"), "play_pressed", Callable(this, "_update_override_camera_button").bind(true));
-	EditorNode::get_singleton()->call_deferred(SNAME("connect"), "stop_pressed", Callable(this, "_update_override_camera_button").bind(false));
+	EditorNode::get_singleton()->call_deferred(SNAME("connect"), callable_mp(this, &CanvasItemEditor::_update_override_camera_button).bind(true));
+	EditorNode::get_singleton()->call_deferred(SNAME("connect"), "stop_pressed", callable_mp(this, &CanvasItemEditor::_update_override_camera_button).bind(false));
 
 
 	// A fluid container for all toolbars.
 	// A fluid container for all toolbars.
 	HFlowContainer *main_flow = memnew(HFlowContainer);
 	HFlowContainer *main_flow = memnew(HFlowContainer);
@@ -5883,9 +5881,6 @@ void CanvasItemEditorViewport::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void CanvasItemEditorViewport::_bind_methods() {
-}
-
 CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_item_editor) {
 CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_item_editor) {
 	default_texture_node_type = "Sprite2D";
 	default_texture_node_type = "Sprite2D";
 	// Node2D
 	// Node2D

+ 0 - 2
editor/plugins/canvas_item_editor_plugin.h

@@ -618,8 +618,6 @@ class CanvasItemEditorViewport : public Control {
 	void _show_resource_type_selector();
 	void _show_resource_type_selector();
 	void _update_theme();
 	void _update_theme();
 
 
-	static void _bind_methods();
-
 protected:
 protected:
 	void _notification(int p_what);
 	void _notification(int p_what);
 
 

+ 1 - 5
editor/plugins/texture_3d_editor_plugin.cpp

@@ -138,10 +138,6 @@ void Texture3DEditor::edit(Ref<Texture3D> p_texture) {
 	}
 	}
 }
 }
 
 
-void Texture3DEditor::_bind_methods() {
-	ClassDB::bind_method(D_METHOD("_layer_changed"), &Texture3DEditor::_layer_changed);
-}
-
 Texture3DEditor::Texture3DEditor() {
 Texture3DEditor::Texture3DEditor() {
 	set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
 	set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
 	set_custom_minimum_size(Size2(1, 150));
 	set_custom_minimum_size(Size2(1, 150));
@@ -173,7 +169,7 @@ Texture3DEditor::Texture3DEditor() {
 	info->add_theme_constant_override("shadow_offset_y", 2);
 	info->add_theme_constant_override("shadow_offset_y", 2);
 
 
 	setting = false;
 	setting = false;
-	layer->connect("value_changed", Callable(this, "_layer_changed"));
+	layer->connect("value_changed", callable_mp(this, &Texture3DEditor::_layer_changed));
 }
 }
 
 
 Texture3DEditor::~Texture3DEditor() {
 Texture3DEditor::~Texture3DEditor() {

+ 0 - 2
editor/plugins/texture_3d_editor_plugin.h

@@ -66,8 +66,6 @@ class Texture3DEditor : public Control {
 protected:
 protected:
 	void _notification(int p_what);
 	void _notification(int p_what);
 
 
-	static void _bind_methods();
-
 public:
 public:
 	void edit(Ref<Texture3D> p_texture);
 	void edit(Ref<Texture3D> p_texture);
 	Texture3DEditor();
 	Texture3DEditor();

+ 1 - 5
editor/plugins/texture_layered_editor_plugin.cpp

@@ -214,10 +214,6 @@ void TextureLayeredEditor::edit(Ref<TextureLayered> p_texture) {
 	}
 	}
 }
 }
 
 
-void TextureLayeredEditor::_bind_methods() {
-	ClassDB::bind_method(D_METHOD("_layer_changed"), &TextureLayeredEditor::_layer_changed);
-}
-
 TextureLayeredEditor::TextureLayeredEditor() {
 TextureLayeredEditor::TextureLayeredEditor() {
 	set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
 	set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
 	set_custom_minimum_size(Size2(1, 150));
 	set_custom_minimum_size(Size2(1, 150));
@@ -249,7 +245,7 @@ TextureLayeredEditor::TextureLayeredEditor() {
 	info->add_theme_constant_override("shadow_offset_y", 2);
 	info->add_theme_constant_override("shadow_offset_y", 2);
 
 
 	setting = false;
 	setting = false;
-	layer->connect("value_changed", Callable(this, "_layer_changed"));
+	layer->connect("value_changed", callable_mp(this, &TextureLayeredEditor::_layer_changed));
 }
 }
 
 
 TextureLayeredEditor::~TextureLayeredEditor() {
 TextureLayeredEditor::~TextureLayeredEditor() {

+ 0 - 1
editor/plugins/texture_layered_editor_plugin.h

@@ -68,7 +68,6 @@ class TextureLayeredEditor : public Control {
 protected:
 protected:
 	void _notification(int p_what);
 	void _notification(int p_what);
 	virtual void gui_input(const Ref<InputEvent> &p_event) override;
 	virtual void gui_input(const Ref<InputEvent> &p_event) override;
-	static void _bind_methods();
 
 
 public:
 public:
 	void edit(Ref<TextureLayered> p_texture);
 	void edit(Ref<TextureLayered> p_texture);

+ 4 - 4
editor/scene_tree_dock.cpp

@@ -1236,14 +1236,14 @@ void SceneTreeDock::_notification(int p_what) {
 
 
 			CanvasItemEditorPlugin *canvas_item_plugin = Object::cast_to<CanvasItemEditorPlugin>(editor_data->get_editor("2D"));
 			CanvasItemEditorPlugin *canvas_item_plugin = Object::cast_to<CanvasItemEditorPlugin>(editor_data->get_editor("2D"));
 			if (canvas_item_plugin) {
 			if (canvas_item_plugin) {
-				canvas_item_plugin->get_canvas_item_editor()->connect("item_lock_status_changed", Callable(scene_tree, "_update_tree"));
-				canvas_item_plugin->get_canvas_item_editor()->connect("item_group_status_changed", Callable(scene_tree, "_update_tree"));
+				canvas_item_plugin->get_canvas_item_editor()->connect("item_lock_status_changed", callable_mp(scene_tree, &SceneTreeEditor::_update_tree));
+				canvas_item_plugin->get_canvas_item_editor()->connect("item_group_status_changed", callable_mp(scene_tree, &SceneTreeEditor::_update_tree));
 				scene_tree->connect("node_changed", callable_mp((CanvasItem *)canvas_item_plugin->get_canvas_item_editor()->get_viewport_control(), &CanvasItem::queue_redraw));
 				scene_tree->connect("node_changed", callable_mp((CanvasItem *)canvas_item_plugin->get_canvas_item_editor()->get_viewport_control(), &CanvasItem::queue_redraw));
 			}
 			}
 
 
 			Node3DEditorPlugin *spatial_editor_plugin = Object::cast_to<Node3DEditorPlugin>(editor_data->get_editor("3D"));
 			Node3DEditorPlugin *spatial_editor_plugin = Object::cast_to<Node3DEditorPlugin>(editor_data->get_editor("3D"));
-			spatial_editor_plugin->get_spatial_editor()->connect("item_lock_status_changed", Callable(scene_tree, "_update_tree"));
-			spatial_editor_plugin->get_spatial_editor()->connect("item_group_status_changed", Callable(scene_tree, "_update_tree"));
+			spatial_editor_plugin->get_spatial_editor()->connect("item_lock_status_changed", callable_mp(scene_tree, &SceneTreeEditor::_update_tree));
+			spatial_editor_plugin->get_spatial_editor()->connect("item_group_status_changed", callable_mp(scene_tree, &SceneTreeEditor::_update_tree));
 
 
 			button_add->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
 			button_add->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
 			button_instance->set_icon(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));
 			button_instance->set_icon(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")));

+ 1 - 1
editor/scene_tree_editor.cpp

@@ -1332,7 +1332,7 @@ void SceneTreeEditor::set_connecting_signal(bool p_enable) {
 }
 }
 
 
 void SceneTreeEditor::_bind_methods() {
 void SceneTreeEditor::_bind_methods() {
-	ClassDB::bind_method(D_METHOD("_update_tree"), &SceneTreeEditor::_update_tree, DEFVAL(false)); // Still used by some connect_compat.
+	ClassDB::bind_method(D_METHOD("_update_tree"), &SceneTreeEditor::_update_tree, DEFVAL(false)); // Still used by UndoRedo.
 	ClassDB::bind_method("_rename_node", &SceneTreeEditor::_rename_node);
 	ClassDB::bind_method("_rename_node", &SceneTreeEditor::_rename_node);
 	ClassDB::bind_method("_test_update_tree", &SceneTreeEditor::_test_update_tree);
 	ClassDB::bind_method("_test_update_tree", &SceneTreeEditor::_test_update_tree);
 
 

+ 3 - 1
editor/scene_tree_editor.h

@@ -76,7 +76,6 @@ class SceneTreeEditor : public Control {
 
 
 	void _add_nodes(Node *p_node, TreeItem *p_parent);
 	void _add_nodes(Node *p_node, TreeItem *p_parent);
 	void _test_update_tree();
 	void _test_update_tree();
-	void _update_tree(bool p_scroll_to_selected = false);
 	bool _update_filter(TreeItem *p_parent = nullptr, bool p_scroll_to_selected = false);
 	bool _update_filter(TreeItem *p_parent = nullptr, bool p_scroll_to_selected = false);
 	bool _item_matches_all_terms(TreeItem *p_item, PackedStringArray p_terms);
 	bool _item_matches_all_terms(TreeItem *p_item, PackedStringArray p_terms);
 	void _tree_changed();
 	void _tree_changed();
@@ -138,6 +137,9 @@ class SceneTreeEditor : public Control {
 	Vector<StringName> valid_types;
 	Vector<StringName> valid_types;
 
 
 public:
 public:
+	// Public for use with callable_mp.
+	void _update_tree(bool p_scroll_to_selected = false);
+
 	void set_filter(const String &p_filter);
 	void set_filter(const String &p_filter);
 	String get_filter() const;
 	String get_filter() const;
 
 

+ 1 - 1
editor/shader_globals_editor.cpp

@@ -483,7 +483,7 @@ ShaderGlobalsEditor::ShaderGlobalsEditor() {
 	inspector->connect("property_deleted", callable_mp(this, &ShaderGlobalsEditor::_variable_deleted), CONNECT_DEFERRED);
 	inspector->connect("property_deleted", callable_mp(this, &ShaderGlobalsEditor::_variable_deleted), CONNECT_DEFERRED);
 
 
 	interface = memnew(ShaderGlobalsEditorInterface);
 	interface = memnew(ShaderGlobalsEditorInterface);
-	interface->connect("var_changed", Callable(this, "_changed"));
+	interface->connect("var_changed", callable_mp(this, &ShaderGlobalsEditor::_changed));
 }
 }
 
 
 ShaderGlobalsEditor::~ShaderGlobalsEditor() {
 ShaderGlobalsEditor::~ShaderGlobalsEditor() {

+ 1 - 1
modules/mono/editor/editor_internal_calls.cpp

@@ -152,7 +152,7 @@ bool godot_icall_Internal_ScriptEditorEdit(Resource *p_resource, int32_t p_line,
 }
 }
 
 
 void godot_icall_Internal_EditorNodeShowScriptScreen() {
 void godot_icall_Internal_EditorNodeShowScriptScreen() {
-	EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT);
+	EditorNode::get_singleton()->editor_select(EditorNode::EDITOR_SCRIPT);
 }
 }
 
 
 void godot_icall_Internal_EditorRunPlay() {
 void godot_icall_Internal_EditorRunPlay() {

+ 1 - 2
scene/3d/skeleton_3d.cpp

@@ -45,7 +45,6 @@ void SkinReference::_skin_changed() {
 }
 }
 
 
 void SkinReference::_bind_methods() {
 void SkinReference::_bind_methods() {
-	ClassDB::bind_method(D_METHOD("_skin_changed"), &SkinReference::_skin_changed);
 	ClassDB::bind_method(D_METHOD("get_skeleton"), &SkinReference::get_skeleton);
 	ClassDB::bind_method(D_METHOD("get_skeleton"), &SkinReference::get_skeleton);
 	ClassDB::bind_method(D_METHOD("get_skin"), &SkinReference::get_skin);
 	ClassDB::bind_method(D_METHOD("get_skin"), &SkinReference::get_skin);
 }
 }
@@ -1007,7 +1006,7 @@ Ref<SkinReference> Skeleton3D::register_skin(const Ref<Skin> &p_skin) {
 
 
 	skin_bindings.insert(skin_ref.operator->());
 	skin_bindings.insert(skin_ref.operator->());
 
 
-	skin_ref->skin->connect("changed", Callable(skin_ref.operator->(), "_skin_changed"));
+	skin_ref->skin->connect("changed", callable_mp(skin_ref.operator->(), &SkinReference::_skin_changed));
 
 
 	_make_dirty(); // Skin needs to be updated, so update skeleton.
 	_make_dirty(); // Skin needs to be updated, so update skeleton.
 
 

+ 3 - 1
scene/3d/skeleton_3d.h

@@ -51,12 +51,14 @@ class SkinReference : public RefCounted {
 	uint64_t skeleton_version = 0;
 	uint64_t skeleton_version = 0;
 	Vector<uint32_t> skin_bone_indices;
 	Vector<uint32_t> skin_bone_indices;
 	uint32_t *skin_bone_indices_ptrs = nullptr;
 	uint32_t *skin_bone_indices_ptrs = nullptr;
-	void _skin_changed();
 
 
 protected:
 protected:
 	static void _bind_methods();
 	static void _bind_methods();
 
 
 public:
 public:
+	// Public for use with callable_mp.
+	void _skin_changed();
+
 	RID get_skeleton() const;
 	RID get_skeleton() const;
 	Ref<Skin> get_skin() const;
 	Ref<Skin> get_skin() const;
 	~SkinReference();
 	~SkinReference();