2019-12-26 15:33:43 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "BlueprintGraphModule.h"
|
2014-04-23 20:18:55 -04:00
|
|
|
|
2022-11-08 16:28:09 -05:00
|
|
|
#include "AssetBlueprintGraphActions.h"
|
2018-05-30 14:29:29 -04:00
|
|
|
#include "EdGraphSchema_K2.h"
|
2020-10-23 13:33:05 -04:00
|
|
|
#include "BlueprintTypePromotion.h"
|
2018-05-30 14:29:29 -04:00
|
|
|
#include "Modules/ModuleManager.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE( FBlueprintGraphModule, BlueprintGraph );
|
|
|
|
|
|
2018-05-30 14:29:29 -04:00
|
|
|
void FBlueprintGraphModule::ShutdownModule()
|
|
|
|
|
{
|
|
|
|
|
UEdGraphSchema_K2::Shutdown();
|
2020-10-23 13:33:05 -04:00
|
|
|
FTypePromotion::Shutdown();
|
2022-11-08 16:28:09 -05:00
|
|
|
AssetBlueprintGraphActions.Reset();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FBlueprintGraphModule::RegisterGraphAction(const UClass* AssetType, TUniquePtr<FAssetBlueprintGraphActions> Action)
|
|
|
|
|
{
|
|
|
|
|
ensure(!AssetBlueprintGraphActions.Contains(AssetType));
|
|
|
|
|
AssetBlueprintGraphActions.Add(AssetType, MoveTemp(Action));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FBlueprintGraphModule::UnregisterGraphAction(const UClass* AssetType)
|
|
|
|
|
{
|
|
|
|
|
AssetBlueprintGraphActions.Remove(AssetType);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const FAssetBlueprintGraphActions* FBlueprintGraphModule::GetAssetBlueprintGraphActions(const UClass* AssetType) const
|
|
|
|
|
{
|
|
|
|
|
if (const TUniquePtr<FAssetBlueprintGraphActions>* Actions = AssetBlueprintGraphActions.Find(AssetType))
|
|
|
|
|
{
|
|
|
|
|
return Actions->Get();
|
|
|
|
|
}
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|