Fix python fbx tests (#2171)
* Update fbx test dbgsg files Remove rc products from fbx test expected output Update warning counts for 2 of the tests - these are due to missing material properties Add SkipAtomOutput setting to disable atom material and mesh processing in scene as these pull in a lot of external dependencies to Process Removed BlendShapeData and MeshData debug output of positions/normals/faces Updated ManifestImportRequestHandler to remove warning about Joining 2 absolute paths Updated AssImpMaterialImporter to use new GenerateRelativeSourcePath API to fix issue where relative path generation failed with tmp project directories Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Add comment for setting Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Add override dbgsg file to python test The mesh optimizer specifically avoids creating optimized nodes for nodes that are not selected, resulting in a different scene graph that requires a different dbgsg file to compare with Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Replace hardcoded passing of specific registry setting to instead pass all registry settings to AssetBuilder Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <native/connection/connection.h>
|
||||
#include <native/utilities/AssetBuilderInfo.h>
|
||||
#include <QCoreApplication>
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
|
||||
namespace AssetProcessor
|
||||
{
|
||||
@@ -221,6 +222,26 @@ namespace AssetProcessor
|
||||
#endif // !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS
|
||||
}
|
||||
|
||||
auto settingsRegistry = AZ::SettingsRegistry::Get();
|
||||
AZ::CommandLine commandLine;
|
||||
AZ::SettingsRegistryMergeUtils::GetCommandLineFromRegistry(*settingsRegistry, commandLine);
|
||||
AZStd::fixed_vector optionKeys{ "regset", "regremove" };
|
||||
for (auto&& optionKey : optionKeys)
|
||||
{
|
||||
size_t commandOptionCount = commandLine.GetNumSwitchValues(optionKey);
|
||||
for (size_t optionIndex = 0; optionIndex < commandOptionCount; ++optionIndex)
|
||||
{
|
||||
const AZStd::string& optionValue = commandLine.GetSwitchValue(optionKey, optionIndex);
|
||||
params.append(AZStd::string::format(
|
||||
#if !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS
|
||||
R"( --%s="%s")",
|
||||
#else
|
||||
R"( --%s="\"%s\"")",
|
||||
#endif
|
||||
optionKey, optionValue.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <API/EditorAssetSystemAPI.h>
|
||||
#include <SceneAPI/SceneBuilder/Importers/AssImpMaterialImporter.h>
|
||||
#include <AzCore/IO/FileIO.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
@@ -196,11 +197,18 @@ namespace AZ
|
||||
return texturePathRelativeToScene;
|
||||
}
|
||||
|
||||
bool ok;
|
||||
AZStd::string relativePath, rootPath;
|
||||
AzToolsFramework::AssetSystemRequestBus::BroadcastResult(
|
||||
ok, &AzToolsFramework::AssetSystemRequestBus::Events::GenerateRelativeSourcePath,
|
||||
texturePathRelativeToScene.c_str(), relativePath, rootPath);
|
||||
|
||||
// The engine only supports relative paths to scan folders.
|
||||
// Scene files may have paths to textures, relative to the scene file. Check for those, first.
|
||||
if (AZ::IO::FileIOBase::GetInstance()->Exists(texturePathRelativeToScene.c_str()))
|
||||
// Scene files may have paths to textures, relative to the scene file.
|
||||
// Try to use a scanfolder relative path instead
|
||||
if (ok)
|
||||
{
|
||||
return texturePathRelativeToScene;
|
||||
return relativePath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzCore/UserSettings/UserSettingsComponent.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
@@ -281,26 +281,8 @@ namespace AZ
|
||||
void BlendShapeData::GetDebugOutput(SceneAPI::Utilities::DebugOutput& output) const
|
||||
{
|
||||
output.Write("Positions", m_positions);
|
||||
int index = 0;
|
||||
for (const auto& position : m_positions)
|
||||
{
|
||||
output.Write(AZStd::string::format("\t%d", index).c_str(), position);
|
||||
++index;
|
||||
}
|
||||
index = 0;
|
||||
output.Write("Normals", m_normals);
|
||||
for (const auto& normal : m_normals)
|
||||
{
|
||||
output.Write(AZStd::string::format("\t%d", index).c_str(), normal);
|
||||
++index;
|
||||
}
|
||||
index = 0;
|
||||
output.Write("Faces", m_faces);
|
||||
for (const auto& face : m_faces)
|
||||
{
|
||||
output.WriteArray(AZStd::string::format("\t%d", index).c_str(), face.vertexIndex, 3);
|
||||
++index;
|
||||
}
|
||||
}
|
||||
} // GraphData
|
||||
} // SceneData
|
||||
|
||||
@@ -188,26 +188,8 @@ namespace AZ
|
||||
void MeshData::GetDebugOutput(SceneAPI::Utilities::DebugOutput& output) const
|
||||
{
|
||||
output.Write("Positions", m_positions);
|
||||
int index = 0;
|
||||
for (const auto& position : m_positions)
|
||||
{
|
||||
output.Write(AZStd::string::format("\t%d", index).c_str(), position);
|
||||
++index;
|
||||
}
|
||||
index = 0;
|
||||
output.Write("Normals", m_normals);
|
||||
for (const auto& normal : m_normals)
|
||||
{
|
||||
output.Write(AZStd::string::format("\t%d", index).c_str(), normal);
|
||||
++index;
|
||||
}
|
||||
index = 0;
|
||||
output.Write("FaceList", m_faceList);
|
||||
for (const auto& face : m_faceList)
|
||||
{
|
||||
output.WriteArray(AZStd::string::format("\t%d", index).c_str(), face.vertexIndex, 3);
|
||||
++index;
|
||||
}
|
||||
output.Write("FaceMaterialIds", m_faceMaterialIds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user