Skip to content

Commit

Permalink
Revert "Load assets before enabling editor plugins"
Browse files Browse the repository at this point in the history
This reverts commit 1963c63.

Fixes #52968, fixes #52995.
  • Loading branch information
akien-mga committed Nov 15, 2021
1 parent 9c4c724 commit c24c7ca
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,19 @@ void EditorNode::_notification(int p_what) {
} break;

case NOTIFICATION_READY: {
{
_initializing_addons = true;
Vector<String> addons;
if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) {
addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled");
}

for (int i = 0; i < addons.size(); i++) {
set_addon_plugin_enabled(addons[i], true);
}
_initializing_addons = false;
}

RenderingServer::get_singleton()->viewport_set_disable_2d(get_scene_root()->get_viewport_rid(), true);
RenderingServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(), true);

Expand Down Expand Up @@ -994,18 +1007,6 @@ void EditorNode::_sources_changed(bool p_exist) {
load_scene(defer_load_scene);
defer_load_scene = "";
}

// Only enable addons once resources have been imported
_initializing_addons = true;
Vector<String> addons;
if (ProjectSettings::get_singleton()->has_setting("editor_plugins/enabled")) {
addons = ProjectSettings::get_singleton()->get("editor_plugins/enabled");
}

for (int i = 0; i < addons.size(); i++) {
set_addon_plugin_enabled(addons[i], true);
}
_initializing_addons = false;
}
}

Expand Down

0 comments on commit c24c7ca

Please sign in to comment.