Halfway through with repair of right-click menus

This commit is contained in:
2026-03-20 03:16:50 -04:00
parent 77a3c552f8
commit acc5bafe34
24 changed files with 228 additions and 65 deletions

View 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;
}