2021-04-29 18:12:32 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "GeometryProcessingInterfacesModule.h"
|
|
|
|
|
#include "CoreGlobals.h"
|
|
|
|
|
#include "Features/IModularFeatures.h"
|
|
|
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
|
|
|
|
|
|
#include "GeometryProcessingInterfaces/ApproximateActors.h"
|
2022-08-23 16:01:30 -04:00
|
|
|
#include "GeometryProcessingInterfaces/UVEditorAssetEditor.h"
|
2021-04-29 18:12:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//DEFINE_LOG_CATEGORY_STATIC(LogMeshReduction, Verbose, All);
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE(FGeometryProcessingInterfacesModule, GeometryProcessingInterfaces);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FGeometryProcessingInterfacesModule::StartupModule()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FGeometryProcessingInterfacesModule::ShutdownModule()
|
|
|
|
|
{
|
|
|
|
|
ApproximateActors = nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IGeometryProcessing_ApproximateActors* FGeometryProcessingInterfacesModule::GetApproximateActorsImplementation()
|
|
|
|
|
{
|
|
|
|
|
if (ApproximateActors == nullptr)
|
|
|
|
|
{
|
|
|
|
|
TArray<IGeometryProcessing_ApproximateActors*> ApproximateActorsOptions =
|
|
|
|
|
IModularFeatures::Get().GetModularFeatureImplementations<IGeometryProcessing_ApproximateActors>(IGeometryProcessing_ApproximateActors::GetModularFeatureName());
|
|
|
|
|
|
|
|
|
|
ApproximateActors = (ApproximateActorsOptions.Num() > 0) ? ApproximateActorsOptions[0] : nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ApproximateActors;
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-23 16:01:30 -04:00
|
|
|
IGeometryProcessing_UVEditorAssetEditor* FGeometryProcessingInterfacesModule::GetUVEditorAssetEditorImplementation()
|
|
|
|
|
{
|
|
|
|
|
if (UVEditorAssetEditor == nullptr)
|
|
|
|
|
{
|
|
|
|
|
TArray<IGeometryProcessing_UVEditorAssetEditor*> UVEditorAssetEditorOptions =
|
|
|
|
|
IModularFeatures::Get().GetModularFeatureImplementations<IGeometryProcessing_UVEditorAssetEditor>(IGeometryProcessing_UVEditorAssetEditor::GetModularFeatureName());
|
|
|
|
|
|
|
|
|
|
UVEditorAssetEditor = (UVEditorAssetEditorOptions.Num() > 0) ? UVEditorAssetEditorOptions[0] : nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return UVEditorAssetEditor;
|
|
|
|
|
}
|
|
|
|
|
|