ATOM-16854 Texture Settings dialog box crashes in the Editor (#5777)
Changes include: -Fixed image preview issue which was trying to convert a compressed texture directly to QImage. -Fixed texture resolution display for cubemap in texture setting editor. -Sort the preset names in preset combo box -Fixed a crash when showing IBLSkybox preset info in texture setting editor Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
This commit is contained in:
+26
@@ -146,6 +146,25 @@ namespace ImageProcessingAtom
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AZStd::vector<AZStd::string> BuilderSettingManager::GetFileMasksForPreset(const PresetName& presetName) const
|
||||
{
|
||||
AZStd::vector<AZStd::string> fileMasks;
|
||||
|
||||
AZStd::lock_guard<AZStd::recursive_mutex> lock(m_presetMapLock);
|
||||
for (const auto& mapping:m_presetFilterMap)
|
||||
{
|
||||
for (const auto& preset : mapping.second)
|
||||
{
|
||||
if (preset == presetName)
|
||||
{
|
||||
fileMasks.push_back(mapping.first);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return fileMasks;
|
||||
}
|
||||
|
||||
const BuilderSettings* BuilderSettingManager::GetBuilderSetting(const PlatformName& platform) const
|
||||
{
|
||||
auto itr = m_builderSettings.find(platform);
|
||||
@@ -177,6 +196,13 @@ namespace ImageProcessingAtom
|
||||
return m_presetFilterMap;
|
||||
}
|
||||
|
||||
const AZStd::unordered_set<PresetName>& BuilderSettingManager::GetFullPresetList() const
|
||||
{
|
||||
AZStd::lock_guard<AZStd::recursive_mutex> lock(m_presetMapLock);
|
||||
AZStd::string noFilter = AZStd::string();
|
||||
return m_presetFilterMap.find(noFilter)->second;
|
||||
}
|
||||
|
||||
const PresetName BuilderSettingManager::GetPresetNameFromId(const AZ::Uuid& presetId)
|
||||
{
|
||||
AZStd::lock_guard<AZStd::recursive_mutex> lock(m_presetMapLock);
|
||||
|
||||
Reference in New Issue
Block a user