diff options
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r-- | editor/editor_plugin.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index e27f1ab9eb..310a107ca9 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -211,6 +211,10 @@ String EditorInterface::get_selected_path() const { return EditorNode::get_singleton()->get_filesystem_dock()->get_selected_path(); } +String EditorInterface::get_current_path() const { + return EditorNode::get_singleton()->get_filesystem_dock()->get_current_path(); +} + void EditorInterface::inspect_object(Object *p_obj, const String &p_for_property) { EditorNode::get_singleton()->push_item(p_obj, p_for_property); @@ -238,7 +242,7 @@ Control *EditorInterface::get_base_control() { } void EditorInterface::set_plugin_enabled(const String &p_plugin, bool p_enabled) { - EditorNode::get_singleton()->set_addon_plugin_enabled(p_plugin, p_enabled); + EditorNode::get_singleton()->set_addon_plugin_enabled(p_plugin, p_enabled, true); } bool EditorInterface::is_plugin_enabled(const String &p_plugin) const { @@ -288,6 +292,7 @@ void EditorInterface::_bind_methods() { ClassDB::bind_method(D_METHOD("make_mesh_previews", "meshes", "preview_size"), &EditorInterface::_make_mesh_previews); ClassDB::bind_method(D_METHOD("select_file", "file"), &EditorInterface::select_file); ClassDB::bind_method(D_METHOD("get_selected_path"), &EditorInterface::get_selected_path); + ClassDB::bind_method(D_METHOD("get_current_path"), &EditorInterface::get_current_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); |