Correctly register editor-only module classes with the API
(cherry picked from commit 0f8c955c1a
)
This commit is contained in:
parent
5f3bd68cfe
commit
9f10aedb17
@ -52,8 +52,13 @@ void initialize_minimp3_module(ModuleInitializationLevel p_level) {
|
||||
ResourceFormatImporter::get_singleton()->add_importer(mp3_import);
|
||||
}
|
||||
|
||||
ClassDB::APIType prev_api = ClassDB::get_current_api();
|
||||
ClassDB::set_current_api(ClassDB::API_EDITOR);
|
||||
|
||||
// Required to document import options in the class reference.
|
||||
GDREGISTER_CLASS(ResourceImporterMP3);
|
||||
|
||||
ClassDB::set_current_api(prev_api);
|
||||
#endif
|
||||
|
||||
GDREGISTER_CLASS(AudioStreamMP3);
|
||||
|
@ -48,8 +48,13 @@ void initialize_vorbis_module(ModuleInitializationLevel p_level) {
|
||||
ResourceFormatImporter::get_singleton()->add_importer(ogg_vorbis_importer);
|
||||
}
|
||||
|
||||
ClassDB::APIType prev_api = ClassDB::get_current_api();
|
||||
ClassDB::set_current_api(ClassDB::API_EDITOR);
|
||||
|
||||
// Required to document import options in the class reference.
|
||||
GDREGISTER_CLASS(ResourceImporterOggVorbis);
|
||||
|
||||
ClassDB::set_current_api(prev_api);
|
||||
#endif
|
||||
|
||||
GDREGISTER_CLASS(AudioStreamOggVorbis);
|
||||
|
Loading…
Reference in New Issue
Block a user