diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-09-20 17:28:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-20 17:28:39 +0200 |
commit | 712a82a6f66399343f96558267c09b2ae473d4de (patch) | |
tree | a5d91cba0a42d3443d5eec6e74048095d926815a /editor | |
parent | 77ec3ec0a30e38af4cd573b98d3934c18b91a48f (diff) | |
parent | 50da1b7d15f2a7c5babf059dd649eea1cd0497ec (diff) |
Merge pull request #32134 from IronicallySerious/fix-global-class-list
Add correct class selection in Select VCS menu
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/version_control_editor_plugin.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index ad3cf3febd..c41f51d387 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -381,7 +381,19 @@ void VersionControlEditorPlugin::register_editor() { void VersionControlEditorPlugin::fetch_available_vcs_addon_names() { - ScriptServer::get_global_class_list(&available_addons); + List<StringName> global_classes; + ScriptServer::get_global_class_list(&global_classes); + + for (int i = 0; i != global_classes.size(); i++) { + + String path = ScriptServer::get_global_class_path(global_classes[i]); + Ref<Script> script = ResourceLoader::load(path); + + if (script->get_instance_base_type() == "EditorVCSInterface") { + + available_addons.push_back(global_classes[i]); + } + } } void VersionControlEditorPlugin::clear_stage_area() { |