Halfway through with repair of right-click menus
This commit is contained in:
26
Plugins/UEWingman/Deprecated/OldSearchNodeSpawners.cpp
Normal file
26
Plugins/UEWingman/Deprecated/OldSearchNodeSpawners.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// This code was extracted from git commit 0e79b02^ (the commit before it was
|
||||
// replaced with GetGraphContextActions). Original file was:
|
||||
// Plugins/BlueprintMCP/Source/BlueprintMCP/Private/MCPUtils.cpp
|
||||
//
|
||||
// It uses FBlueprintActionDatabase to search for spawnable node types,
|
||||
// which is the correct approach for Blueprint (K2) graphs.
|
||||
|
||||
#include "BlueprintActionDatabase.h"
|
||||
#include "BlueprintNodeSpawner.h"
|
||||
|
||||
FString MCPUtils::NodeSpawnerFullName(UBlueprintNodeSpawner* Spawner)
|
||||
{
|
||||
const FBlueprintActionUiSpec& UiSpec = Spawner->PrimeDefaultUiSpec();
|
||||
FString Category = UiSpec.Category.ToString();
|
||||
FString MenuName = UiSpec.MenuName.ToString();
|
||||
if (Category.IsEmpty())
|
||||
{
|
||||
return MenuName;
|
||||
}
|
||||
return Category + TEXT("|") + MenuName;
|
||||
}
|
||||
|
||||
TArray<UBlueprintNodeSpawner*> MCPUtils::SearchNodeSpawners(const FString& Query, int32 MaxResults, bool ExactMatch, UEdGraph* GraphFilter)
|
||||
{
|
||||
return Result;
|
||||
}
|
||||
Reference in New Issue
Block a user