41 lines
1011 B
C++
41 lines
1011 B
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "WingHandler.h"
|
|
#include "WingServer.h"
|
|
#include "WingFetcher.h"
|
|
#include "WingGraphExport.h"
|
|
#include "GraphNode_Dump.generated.h"
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
|
UCLASS()
|
|
class UWing_GraphNode_Dump : public UObject, public IWingHandler
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(meta=(Description="Target node"))
|
|
FString Node;
|
|
|
|
virtual FString GetDescription() const override
|
|
{
|
|
return TEXT("Dump a single node as readable text, including all pins and connections.");
|
|
}
|
|
|
|
private:
|
|
virtual void Handle() override
|
|
{
|
|
WingFetcher F;
|
|
UEdGraphNode* NodeObj = F.Walk(Node).Cast<UEdGraphNode>();
|
|
if (!NodeObj) return;
|
|
|
|
WingGraphExport Exporter(NodeObj);
|
|
UWingServer::Print(*Exporter.GetOutput());
|
|
UWingServer::Print(Exporter.GetDetails());
|
|
}
|
|
};
|