FBX settings can be opened again: g_fbxImporter is set, and if the ex… (#878)
* FBX settings can be opened again: g_fbxImporter is set, and if the extension list is empty, it is reloaded. * auto -> auto*, .size() == 0 -> .empty()
This commit is contained in:
@@ -39,9 +39,7 @@ namespace AZ
|
||||
|
||||
void FbxImportRequestHandler::Activate()
|
||||
{
|
||||
auto settingsRegistry = AZ::SettingsRegistry::Get();
|
||||
|
||||
if (settingsRegistry)
|
||||
if (auto* settingsRegistry = AZ::SettingsRegistry::Get())
|
||||
{
|
||||
settingsRegistry->GetObject(m_settings, "/O3DE/SceneAPI/AssetImporter");
|
||||
}
|
||||
@@ -70,6 +68,15 @@ namespace AZ
|
||||
|
||||
void FbxImportRequestHandler::GetSupportedFileExtensions(AZStd::unordered_set<AZStd::string>& extensions)
|
||||
{
|
||||
// It's unlikely an empty file extension list is intentional,
|
||||
// so if it's empty, try reloading it from the registry.
|
||||
if (m_settings.m_supportedFileTypeExtensions.empty())
|
||||
{
|
||||
if (auto* settingsRegistry = AZ::SettingsRegistry::Get())
|
||||
{
|
||||
settingsRegistry->GetObject(m_settings, "/O3DE/SceneAPI/AssetImporter");
|
||||
}
|
||||
}
|
||||
extensions.insert(m_settings.m_supportedFileTypeExtensions.begin(), m_settings.m_supportedFileTypeExtensions.end());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user