You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Add interface for plugins to enable/disable other plugins
(cherry picked from commit 87be0bc110)
This commit is contained in:
committed by
Hein-Pieter van Braam
parent
845f44b976
commit
0a75a38db4
@@ -235,6 +235,14 @@ Control *EditorInterface::get_base_control() {
|
||||
return EditorNode::get_singleton()->get_gui_base();
|
||||
}
|
||||
|
||||
void EditorInterface::set_plugin_enabled(const String &p_plugin, bool p_enabled) {
|
||||
EditorNode::get_singleton()->set_addon_plugin_enabled(p_plugin, p_enabled);
|
||||
}
|
||||
|
||||
bool EditorInterface::is_plugin_enabled(const String &p_plugin) const {
|
||||
return EditorNode::get_singleton()->is_addon_plugin_enabled(p_plugin);
|
||||
}
|
||||
|
||||
Error EditorInterface::save_scene() {
|
||||
if (!get_edited_scene_root())
|
||||
return ERR_CANT_CREATE;
|
||||
@@ -271,6 +279,9 @@ void EditorInterface::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("select_file", "p_file"), &EditorInterface::select_file);
|
||||
ClassDB::bind_method(D_METHOD("get_selected_path"), &EditorInterface::get_selected_path);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_plugin_enabled", "plugin", "enabled"), &EditorInterface::set_plugin_enabled);
|
||||
ClassDB::bind_method(D_METHOD("is_plugin_enabled", "plugin"), &EditorInterface::is_plugin_enabled);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("save_scene"), &EditorInterface::save_scene);
|
||||
ClassDB::bind_method(D_METHOD("save_scene_as", "path", "with_preview"), &EditorInterface::save_scene_as, DEFVAL(true));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user