2026-03-10 01:42:43 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
2026-03-18 10:17:58 -04:00
|
|
|
#include "WingHandler.h"
|
|
|
|
|
#include "WingServer.h"
|
|
|
|
|
#include "WingFetcher.h"
|
|
|
|
|
#include "WingUtils.h"
|
2026-03-18 10:25:21 -04:00
|
|
|
#include "WingGraphExport.h"
|
2026-03-10 01:42:43 -04:00
|
|
|
#include "Engine/Blueprint.h"
|
|
|
|
|
#include "EdGraph/EdGraph.h"
|
2026-03-10 20:15:59 -04:00
|
|
|
#include "Materials/Material.h"
|
|
|
|
|
#include "MaterialGraph/MaterialGraph.h"
|
2026-03-12 00:44:17 -04:00
|
|
|
#include "Graph_Dump.generated.h"
|
2026-03-10 01:42:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
2026-03-12 00:44:17 -04:00
|
|
|
UCLASS()
|
2026-03-18 10:17:58 -04:00
|
|
|
class UWing_Graph_Dump : public UObject, public IWingHandler
|
2026-03-10 01:42:43 -04:00
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
public:
|
2026-03-15 19:03:29 -04:00
|
|
|
UPROPERTY(meta=(Description="Path to graph"))
|
|
|
|
|
FString Graph;
|
|
|
|
|
|
|
|
|
|
UPROPERTY(meta=(Optional, Description="True to include less-significant details"))
|
2026-03-26 16:17:06 -04:00
|
|
|
bool IncludeDetails;
|
2026-03-10 01:42:43 -04:00
|
|
|
|
|
|
|
|
virtual FString GetDescription() const override
|
|
|
|
|
{
|
2026-03-15 19:03:29 -04:00
|
|
|
return TEXT("Dump blueprint or material graphs as readable text. ");
|
2026-03-10 01:42:43 -04:00
|
|
|
}
|
|
|
|
|
|
2026-03-13 23:41:59 -04:00
|
|
|
virtual void Handle() override
|
2026-03-10 01:42:43 -04:00
|
|
|
{
|
2026-03-18 10:17:58 -04:00
|
|
|
WingFetcher F;
|
2026-03-17 17:24:35 -04:00
|
|
|
UEdGraph *G = F.Walk(Graph).Cast<UEdGraph>();
|
2026-03-15 19:03:29 -04:00
|
|
|
if (!G) return;
|
|
|
|
|
|
2026-03-18 10:17:58 -04:00
|
|
|
WingGraphExport Exporter(G);
|
|
|
|
|
UWingServer::Print(*Exporter.GetOutput());
|
2026-03-26 16:17:06 -04:00
|
|
|
if (IncludeDetails)
|
2026-03-10 20:15:59 -04:00
|
|
|
{
|
2026-03-18 10:17:58 -04:00
|
|
|
UWingServer::Print(Exporter.GetDetails());
|
2026-03-10 20:15:59 -04:00
|
|
|
}
|
2026-03-15 19:03:29 -04:00
|
|
|
else
|
2026-03-10 01:42:43 -04:00
|
|
|
{
|
2026-03-25 17:24:02 -04:00
|
|
|
UWingServer::Printf(TEXT("\nNote: use bDetails=true to see suppressed details."));
|
2026-03-10 01:42:43 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|