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 55f9ae3.

It caused regressions godotengine#52968 and godotengine#52995.
  • Loading branch information
akien-mga authored and sairam4123 committed Nov 10, 2021
1 parent a840da2 commit d9c51aa
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 @@ -485,6 +485,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;
}

VisualServer::get_singleton()->viewport_set_hide_scenario(get_scene_root()->get_viewport_rid(), true);
VisualServer::get_singleton()->viewport_set_hide_canvas(get_scene_root()->get_viewport_rid(), true);
VisualServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(), true);
Expand Down Expand Up @@ -836,18 +849,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 d9c51aa

Please sign in to comment.