{LYN-4996} Asset Processor is not reprocessing STL files after settings are edited/updated (#2095)
* add asset importer file extension Signed-off-by: sharmajs <sharmajs@amazon.com> * add new test setreg file Signed-off-by: sharmajs <sharmajs@amazon.com> * removed an unnecessary namespace Signed-off-by: sharmajs <sharmajs@amazon.com> * addressed feedback Signed-off-by: sharmajs <sharmajs@amazon.com> * addressed feedback Signed-off-by: sharmajs <sharmajs@amazon.com> * remove unnecessay method Signed-off-by: sharmajs <sharmajs@amazon.com> * add file Signed-off-by: sharmajs <sharmajs@amazon.com> * reduce waiting time in block until idle Signed-off-by: sharmajs <sharmajs@amazon.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
#include <AzFramework/Gem/GemInfo.h>
|
||||
#include <AzToolsFramework/Asset/AssetUtils.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -23,6 +24,21 @@ namespace
|
||||
|
||||
namespace AssetProcessor
|
||||
{
|
||||
|
||||
void AssetImporterPathsVisitor::Visit([[maybe_unused]] AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type,
|
||||
AZStd::string_view value)
|
||||
{
|
||||
auto found = value.find('.');
|
||||
if (found != AZStd::string::npos)
|
||||
{
|
||||
m_supportedFileExtensions.emplace_back(value.substr(found + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_supportedFileExtensions.emplace_back(value);
|
||||
}
|
||||
}
|
||||
|
||||
struct PlatformsInfoVisitor
|
||||
: AZ::SettingsRegistryInterface::Visitor
|
||||
{
|
||||
@@ -1126,6 +1142,17 @@ namespace AssetProcessor
|
||||
|
||||
MetaDataTypesVisitor visitor;
|
||||
settingsRegistry->Visit(visitor, AZ::SettingsRegistryInterface::FixedValueString(AssetProcessorSettingsKey) + "/MetaDataTypes");
|
||||
|
||||
using namespace AzToolsFramework::AssetUtils;
|
||||
AZStd::vector<AZStd::string> supportedFileExtensions;
|
||||
AssetImporterPathsVisitor assetImporterVisitor{ settingsRegistry, supportedFileExtensions };
|
||||
settingsRegistry->Visit(assetImporterVisitor, AZ::SettingsRegistryInterface::FixedValueString(AssetImporterSettingsKey) + "/" + AssetImporterSupportedFileTypeKey);
|
||||
|
||||
for (auto& entry : assetImporterVisitor.m_supportedFileExtensions)
|
||||
{
|
||||
visitor.m_metaDataTypes.push_back({ AZStd::string::format("%s.assetinfo", entry.c_str()), entry });
|
||||
}
|
||||
|
||||
for (const auto& metaDataType : visitor.m_metaDataTypes)
|
||||
{
|
||||
QString fileType = AssetUtilities::NormalizeFilePath(QString::fromUtf8(metaDataType.m_fileType.c_str(),
|
||||
|
||||
Reference in New Issue
Block a user