Files
UnrealEngineUWP/Engine/Plugins/Developer/AnimationSharing/Source/AnimationSharingEd/Private/AnimationSharingEdModule.cpp
henrik karlsson 2f78497e67 [Engine/Plugins]
* Updated private files with IWYU for all plugins which had 3 or less changes made in ue5 main since last integration to fn

#preflight 63bf8d8b577437afe607dc72
#rb none

[CL 23659643 by henrik karlsson in ue5-main branch]
2023-01-12 01:48:34 -05:00

44 lines
1.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "AnimationSharingEdModule.h"
#include "AssetTypeActions_AnimationSharingSetup.h"
#include "PropertyEditorModule.h"
#include "SetupDetailsViewCustomizations.h"
IMPLEMENT_MODULE(FAnimSharingEdModule, AnimationSharingEd );
void FAnimSharingEdModule::StartupModule()
{
FAssetToolsModule& AssetToolsModule = FAssetToolsModule::GetModule();
IAssetTools& AssetTools = AssetToolsModule.Get();
AssetAction = new FAssetTypeActions_AnimationSharingSetup();
AssetTools.RegisterAssetTypeActions(MakeShareable(AssetAction));
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
{
PropertyModule.RegisterCustomPropertyTypeLayout("PerSkeletonAnimationSharingSetup", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FPerSkeletonAnimationSharingSetupCustomization::MakeInstance));
PropertyModule.RegisterCustomPropertyTypeLayout("AnimationStateEntry", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FAnimationStateEntryCustomization::MakeInstance));
PropertyModule.RegisterCustomPropertyTypeLayout("AnimationSetup", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FAnimationSetupCustomization::MakeInstance));
}
}
void FAnimSharingEdModule::ShutdownModule()
{
if (UObjectInitialized())
{
FAssetToolsModule& AssetToolsModule = FAssetToolsModule::GetModule();
IAssetTools& AssetTools = AssetToolsModule.Get();
AssetTools.UnregisterAssetTypeActions(AssetAction->AsShared());
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
{
PropertyModule.UnregisterCustomPropertyTypeLayout("PerSkeletonAnimationSharingSetup");
PropertyModule.UnregisterCustomPropertyTypeLayout("AnimationStateEntry");
PropertyModule.UnregisterCustomPropertyTypeLayout("AnimationSetup");
}
}
}