More MCP work

This commit is contained in:
2026-03-08 03:44:27 -04:00
parent 0fe0cfa1c2
commit a72b65641e
13 changed files with 381 additions and 922 deletions

View File

@@ -189,6 +189,38 @@ FString MCPUtils::UrlDecode(const FString& EncodedString)
// Blueprint helpers
// ============================================================
TArray<UEdGraph*> MCPUtils::AllGraphs(UBlueprint* BP)
{
TArray<UEdGraph*> Graphs;
BP->GetAllGraphs(Graphs);
return Graphs;
}
TArray<UEdGraph*> MCPUtils::AllGraphsNamed(UBlueprint* BP, const FString& Name)
{
TArray<UEdGraph*> Result;
for (UEdGraph* Graph : AllGraphs(BP))
if (Graph->GetName().Equals(Name, ESearchCase::IgnoreCase))
Result.Add(Graph);
return Result;
}
TArray<UEdGraphNode*> MCPUtils::AllNodes(UBlueprint* BP)
{
TArray<UEdGraphNode*> Nodes;
for (UEdGraph* Graph : AllGraphs(BP))
Nodes.Append(Graph->Nodes);
return Nodes;
}
TArray<TSharedPtr<FJsonValue>> MCPUtils::AllGraphNamesJson(UBlueprint* BP)
{
TArray<TSharedPtr<FJsonValue>> Result;
for (UEdGraph* Graph : AllGraphs(BP))
Result.Add(MakeShared<FJsonValueString>(Graph->GetName()));
return Result;
}
UEdGraphNode* MCPUtils::FindNodeByGuid(
UBlueprint* BP, const FString& GuidString, UEdGraph** OutGraph)
{