2022-10-16 02:28:34 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "SparseVolumeTextureModule.h"
|
|
|
|
|
|
|
|
|
|
#include "SparseVolumeTextureOpenVDB.h"
|
2022-11-25 09:18:31 -05:00
|
|
|
#include "SparseVolumeTexture/SparseVolumeTexture.h"
|
|
|
|
|
#include "SparseVolumeTextureOpenVDBUtility.h"
|
2022-10-16 02:28:34 -04:00
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "SparseVolumeTextureModule"
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE(FSparseVolumeTextureModule, SparseVolumeTexture);
|
|
|
|
|
|
|
|
|
|
void FSparseVolumeTextureModule::StartupModule()
|
|
|
|
|
{
|
|
|
|
|
IAssetTools& AssetTools = FModuleManager::LoadModuleChecked<FAssetToolsModule>(TEXT("AssetTools")).Get();
|
|
|
|
|
AssetTypeActionsForSparseVolumeTexture = MakeShareable(new FAssetTypeActions_SparseVolumeTexture);
|
|
|
|
|
AssetTools.RegisterAssetTypeActions(AssetTypeActionsForSparseVolumeTexture.ToSharedRef());
|
|
|
|
|
|
|
|
|
|
#if PLATFORM_WINDOWS
|
|
|
|
|
// Global registration of the vdb types.
|
|
|
|
|
openvdb::initialize();
|
|
|
|
|
#endif
|
2022-11-25 09:18:31 -05:00
|
|
|
|
|
|
|
|
// USparseVolumeTexture needs to access (only) this function for cooking.
|
|
|
|
|
OnConvertOpenVDBToSparseVolumeTexture().BindStatic(ConvertOpenVDBToSparseVolumeTexture);
|
2022-10-16 02:28:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FSparseVolumeTextureModule::ShutdownModule()
|
|
|
|
|
{
|
2022-11-25 09:18:31 -05:00
|
|
|
OnConvertOpenVDBToSparseVolumeTexture().Unbind();
|
2022-10-16 02:28:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|