FbxImportRequestHandler is now loaded only once per AssetBuilder and Editor + re-enabled STL support (#933)
* Revert "FBX settings can be opened again: g_fbxImporter is set, and if the ex… (#878)" This reverts commit58adcf168f. * Revert "Merge pull request #753 from aws-lumberyard-dev/Helios_DataDrivenAssetImporter" This reverts commit798d96f1a2, reversing changes made toeb31d90ad9. * Revert "Revert "Merge pull request #753 from aws-lumberyard-dev/Helios_DataDrivenAssetImporter"" This reverts commit c1124f26d957388e88cc4990021314b5af247e1d. * Revert "Revert "FBX settings can be opened again: g_fbxImporter is set, and if the ex… (#878)"" This reverts commit 978477097892a22e83519646527ff52ba6532f35. * Fixed how FbxImportRequestHandler is loaded * Bumped version to force FBX to rebuild + removed unused variable * Revert "Revert "FBX settings can be opened again: g_fbxImporter is set, and if the ex… (#878)"" This reverts commit 978477097892a22e83519646527ff52ba6532f35. * Revert "Revert "Merge pull request #753 from aws-lumberyard-dev/Helios_DataDrivenAssetImporter"" This reverts commit c1124f26d957388e88cc4990021314b5af247e1d. * Fixed a bad revert * Better error reporting at AP launch * AZ_CRC -> AZ_CRC_CE and removed delayed reload of settings registry file now that it's available at startup * fixed typo in comment
This commit is contained in:
@@ -38,21 +38,8 @@ namespace AZ
|
||||
{
|
||||
namespace FbxSceneBuilder
|
||||
{
|
||||
static AZ::SceneAPI::FbxSceneImporter::FbxImportRequestHandler* g_fbxImporter = nullptr;
|
||||
static AZStd::vector<AZ::ComponentDescriptor*> g_componentDescriptors;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
// Currently it's still needed to explicitly create an instance of this instead of letting
|
||||
// it be a normal component. This is because ResourceCompilerScene needs to return
|
||||
// the list of available extensions before it can start the application.
|
||||
if (!g_fbxImporter)
|
||||
{
|
||||
g_fbxImporter = aznew AZ::SceneAPI::FbxSceneImporter::FbxImportRequestHandler();
|
||||
g_fbxImporter->Activate();
|
||||
}
|
||||
}
|
||||
|
||||
void Reflect(AZ::SerializeContext* /*context*/)
|
||||
{
|
||||
// Descriptor registration is done in Reflect instead of Initialize because the ResourceCompilerScene initializes the libraries before
|
||||
@@ -64,6 +51,7 @@ namespace AZ
|
||||
{
|
||||
// Global importer and behavior
|
||||
g_componentDescriptors.push_back(FbxSceneBuilder::FbxImporter::CreateDescriptor());
|
||||
g_componentDescriptors.push_back(FbxSceneImporter::FbxImportRequestHandler::CreateDescriptor());
|
||||
|
||||
// Node and attribute importers
|
||||
g_componentDescriptors.push_back(AssImpBitangentStreamImporter::CreateDescriptor());
|
||||
@@ -110,13 +98,6 @@ namespace AZ
|
||||
g_componentDescriptors.clear();
|
||||
g_componentDescriptors.shrink_to_fit();
|
||||
}
|
||||
|
||||
if (g_fbxImporter)
|
||||
{
|
||||
g_fbxImporter->Deactivate();
|
||||
delete g_fbxImporter;
|
||||
g_fbxImporter = nullptr;
|
||||
}
|
||||
}
|
||||
} // namespace FbxSceneBuilder
|
||||
} // namespace SceneAPI
|
||||
@@ -125,7 +106,6 @@ namespace AZ
|
||||
extern "C" AZ_DLL_EXPORT void InitializeDynamicModule(void* env)
|
||||
{
|
||||
AZ::Environment::Attach(static_cast<AZ::EnvironmentInstance>(env));
|
||||
AZ::SceneAPI::FbxSceneBuilder::Initialize();
|
||||
}
|
||||
extern "C" AZ_DLL_EXPORT void Reflect(AZ::SerializeContext* context)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user