Add a blueprint exporter for claude code

This commit is contained in:
2026-02-15 07:13:53 -05:00
parent f88a969ab4
commit 218863d077
13 changed files with 509 additions and 115 deletions

View File

@@ -0,0 +1,45 @@
#pragma once
#if WITH_EDITOR
#include "CoreMinimal.h"
class UBlueprint;
class UEdGraph;
class UEdGraphNode;
class FlxBlueprintExporter
{
public:
FlxBlueprintExporter(UEdGraph* InGraph);
const FString GetOutput() { return Output.ToString(); }
private:
void SortNodes();
void AssignNodeNames();
void EmitNodeList();
void EmitGraph();
void EmitNode(UEdGraphNode* Node);
void Traverse(UEdGraphNode* Node);
bool HasExecPin(UEdGraphNode* Node, EEdGraphPinDirection Direction);
UEdGraphPin* FindFirstPin(UEdGraphNode* Node, EEdGraphPinDirection Direction);
bool IsDefaultToSelf(UEdGraphPin* Pin);
FString SanitizeName(const FString& Title);
FString FormatPinType(UEdGraphPin* Pin);
FString FormatPinSource(UEdGraphPin* Pin);
UEdGraphPin* GetLinkedTo(UEdGraphPin *Pin);
FString GetPinDisplayName(UEdGraphPin *Pin);
UEdGraph* Graph;
// Data populated by passes.
TMap<UEdGraphNode*, FString> NodeNames;
TArray<UEdGraphNode*> SortedNodes;
TSet<UEdGraphNode*> Visited;
// Output buffer.
TStringBuilder<4096> Output;
};
#endif