Compare commits
5 Commits
854e41d6c3
...
9c3fab26c4
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c3fab26c4 | |||
| 9382ed85f8 | |||
| e9af515c05 | |||
| f77a8553e1 | |||
| b124cf72aa |
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingTypes.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingActorComponent.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingServer.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Misc/Paths.h"
|
||||
#include "Misc/PackageName.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingUtils.h"
|
||||
#include "AssetRegistry/AssetRegistryModule.h"
|
||||
#include "AssetRegistry/AssetData.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Misc/PackageName.h"
|
||||
#include "AssetRegistry/AssetRegistryModule.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingUtils.h"
|
||||
#include "AssetRegistry/AssetData.h"
|
||||
#include "AssetRegistry/IAssetRegistry.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "AssetToolsModule.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Misc/PackageName.h"
|
||||
#include "FileHelpers.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingTypes.h"
|
||||
#include "AssetRegistry/AssetRegistryModule.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingVariables.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingTypes.h"
|
||||
#include "WingUtils.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingTypes.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingTypes.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
@@ -71,22 +71,9 @@ public:
|
||||
BlueprintVars.Print(WingOut::StdoutBuffer);
|
||||
|
||||
// Components
|
||||
TArray<UWingComponentReference*> Components3 = UWingComponentReference::GetAll(BP);
|
||||
if (!Components3.IsEmpty())
|
||||
{
|
||||
WingOut::Stdout.Print(TEXT("\nComponents:\n"));
|
||||
for (const UWingComponentReference* Ref : Components3)
|
||||
{
|
||||
WingOut::Stdout.Printf(TEXT(" %s %s"),
|
||||
*Ref->TypeName,
|
||||
*WingUtils::FormatName(Ref));
|
||||
if (!Ref->ParentName.IsEmpty())
|
||||
WingOut::Stdout.Printf(TEXT(" [parent: %s]"), *Ref->ParentName);
|
||||
if (Ref->Inherited)
|
||||
WingOut::Stdout.Print(TEXT(" [inherited]"));
|
||||
WingOut::Stdout.Print(TEXT("\n"));
|
||||
}
|
||||
}
|
||||
TArray<UWingComponentReference*> Components = UWingComponentReference::GetAll(BP);
|
||||
if (!Components.IsEmpty()) WingOut::Stdout.Print(TEXT("\nComponents:\n"));
|
||||
UWingComponentReference::PrintAll(BP, WingOut::Stdout);
|
||||
|
||||
// Widget Tree
|
||||
if (UWidgetBlueprint* WidgetBP = Cast<UWidgetBlueprint>(BP))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingTypes.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "CoreMinimal.h"
|
||||
#include "Factories/Factory.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingTypes.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingFactories.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Materials/Material.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "CoreMinimal.h"
|
||||
#include "Factories/Factory.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFactories.h"
|
||||
#include "Factories/BlueprintFunctionLibraryFactory.h"
|
||||
#include "Create_NoArgs.generated.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingUtils.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingUtils.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingUtils.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingUtils.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingTypes.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingTypes.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingManual.h"
|
||||
#include "Documentation_Manual.generated.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "Editor.h"
|
||||
#include "Subsystems/AssetEditorSubsystem.h"
|
||||
#include "Editor_ListOpenAssets.generated.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "Editor.h"
|
||||
#include "Subsystems/AssetEditorSubsystem.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingGraphActions.h"
|
||||
#include "WingGraphExport.h"
|
||||
#include "EdGraph/EdGraph.h"
|
||||
#include "EdGraph/EdGraphNode.h"
|
||||
#include "EdGraph/EdGraphSchema.h"
|
||||
@@ -82,11 +83,13 @@ public:
|
||||
UEdGraphNode* NewNode = Entry.Action->Execute(FVector2D(Entry.PosX, Entry.PosY));
|
||||
if (NewNode)
|
||||
{
|
||||
WingOut::Stdout.Printf(TEXT("Spawned: %s %s\n"), *Entry.Type, *WingUtils::FormatName(NewNode));
|
||||
WingOut::Stdout.Printf(TEXT("Spawned: %s\n"), *Entry.Type);
|
||||
WingGraphExport Export(NewNode, false, true);
|
||||
WingOut::Stdout.Print(Export.GetOutput());
|
||||
}
|
||||
else
|
||||
{
|
||||
WingOut::Stdout.Printf(TEXT("FAILED: %s\n"), *Entry.Type);
|
||||
WingOut::Stdout.Printf(TEXT("Failed: %s\n\n"), *Entry.Type);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingToolMenu.h"
|
||||
#include "WingServer.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingGraphExport.h"
|
||||
@@ -21,6 +21,9 @@ public:
|
||||
UPROPERTY(EditAnywhere, meta=(Description="Target node"))
|
||||
FString Node;
|
||||
|
||||
UPROPERTY(EditAnywhere, meta=(Optional, Description="True to show minor node properties"))
|
||||
bool Details = false;
|
||||
|
||||
virtual void Register() override
|
||||
{
|
||||
UWingServer::AddHandler(this,
|
||||
@@ -33,8 +36,7 @@ private:
|
||||
UEdGraphNode* NodeObj = F.Walk(Node).Cast<UEdGraphNode>();
|
||||
if (!NodeObj) return;
|
||||
|
||||
WingGraphExport Exporter(NodeObj);
|
||||
WingOut::Stdout.Print(*Exporter.GetOutput());
|
||||
WingOut::Stdout.Print(Exporter.GetDetails());
|
||||
WingGraphExport Exporter(NodeObj, false, Details);
|
||||
WingOut::Stdout.Print(Exporter.GetOutput());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "EdGraph/EdGraphNode.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingServer.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "EdGraph/EdGraphNode.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingGraphActions.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "EdGraph/EdGraphNode.h"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingPinReference.h"
|
||||
#include "WingReferences.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingUtils.h"
|
||||
#include "EdGraph/EdGraphPin.h"
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
WingFetcher F(GraphObj, WingOut::Stdout);
|
||||
UWingPinReference* PinRef = F.Node(Entry.Node).Pin(Entry.Name).Cast<UWingPinReference>();
|
||||
if (!PinRef) return;
|
||||
UEdGraphPin* Pin = PinRef->CheckGetPin(WingOut::Stdout);
|
||||
UEdGraphPin* Pin = WingUtils::CheckGetPin(PinRef->Node, PinRef->PinName, WingOut::Stdout);
|
||||
if (!Pin) return;
|
||||
|
||||
UEdGraphNode* Node = Pin->GetOwningNode();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingUtils.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingToolMenu.h"
|
||||
#include "WingServer.h"
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingPinReference.h"
|
||||
#include "WingReferences.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
@@ -67,13 +67,13 @@ public:
|
||||
WingFetcher FS(G, WingOut::Stdout);
|
||||
UWingPinReference* SourcePinRef = FS.Walk(Entry.SourcePin).Cast<UWingPinReference>();
|
||||
if (!SourcePinRef) continue;
|
||||
UEdGraphPin* SourcePin = SourcePinRef->CheckGetPin(WingOut::Stdout);
|
||||
UEdGraphPin* SourcePin = WingUtils::CheckGetPin(SourcePinRef->Node, SourcePinRef->PinName, WingOut::Stdout);
|
||||
if (!SourcePin) continue;
|
||||
|
||||
WingFetcher FT(G, WingOut::Stdout);
|
||||
UWingPinReference* TargetPinRef = FT.Walk(Entry.TargetPin).Cast<UWingPinReference>();
|
||||
if (!TargetPinRef) continue;
|
||||
UEdGraphPin* TargetPin = TargetPinRef->CheckGetPin(WingOut::Stdout);
|
||||
UEdGraphPin* TargetPin = WingUtils::CheckGetPin(TargetPinRef->Node, TargetPinRef->PinName, WingOut::Stdout);
|
||||
if (!TargetPin) continue;
|
||||
|
||||
const UEdGraphSchema* Schema = G->GetSchema();
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingPinReference.h"
|
||||
#include "WingReferences.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
WingFetcher FP(G, WingOut::Stdout);
|
||||
UWingPinReference* PinRef = FP.Walk(Entry.Pin).Cast<UWingPinReference>();
|
||||
if (!PinRef) continue;
|
||||
UEdGraphPin* Pin = PinRef->CheckGetPin(WingOut::Stdout);
|
||||
UEdGraphPin* Pin = WingUtils::CheckGetPin(PinRef->Node, PinRef->PinName, WingOut::Stdout);
|
||||
if (!Pin) continue;
|
||||
|
||||
int32 DisconnectedCount = 0;
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
WingFetcher FT(G, WingOut::Stdout);
|
||||
UWingPinReference* TargetRef = FT.Walk(Entry.TargetPin).Cast<UWingPinReference>();
|
||||
if (!TargetRef) continue;
|
||||
UEdGraphPin* Target = TargetRef->CheckGetPin(WingOut::Stdout);
|
||||
UEdGraphPin* Target = WingUtils::CheckGetPin(TargetRef->Node, TargetRef->PinName, WingOut::Stdout);
|
||||
if (!Target) continue;
|
||||
|
||||
if (!Pin->LinkedTo.Contains(Target))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
@@ -26,8 +26,8 @@ public:
|
||||
UPROPERTY(EditAnywhere, meta=(Description="Path to graph"))
|
||||
FString Graph;
|
||||
|
||||
UPROPERTY(EditAnywhere, meta=(Optional, Description="True to include less-significant details"))
|
||||
bool IncludeDetails;
|
||||
UPROPERTY(EditAnywhere, meta=(Optional, Description="True to show minor node properties"))
|
||||
bool Details = false;
|
||||
|
||||
virtual void Register() override
|
||||
{
|
||||
@@ -40,15 +40,7 @@ public:
|
||||
UEdGraph *G = F.Walk(Graph).Cast<UEdGraph>();
|
||||
if (!G) return;
|
||||
|
||||
WingGraphExport Exporter(G);
|
||||
WingOut::Stdout.Print(*Exporter.GetOutput());
|
||||
if (IncludeDetails)
|
||||
{
|
||||
WingOut::Stdout.Print(Exporter.GetDetails());
|
||||
}
|
||||
else
|
||||
{
|
||||
WingOut::Stdout.Printf(TEXT("\nNote: use bDetails=true to see suppressed details."));
|
||||
}
|
||||
WingGraphExport Exporter(G, true, Details);
|
||||
WingOut::Stdout.Print(Exporter.GetOutput());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingParameterEditor.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingParameterEditor.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingParameterEditor.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "Materials/Material.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingUtils.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFactories.h"
|
||||
#include "SysInfo_Factories.generated.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "UObject/UObjectHash.h"
|
||||
#include "SysInfo_PackageContents.generated.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingTypes.h"
|
||||
#include "EdGraphSchema_K2.h"
|
||||
#include "GameFramework/Actor.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingVariables.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingVariables.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingVariables.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingVariables.h"
|
||||
#include "Variables_Remove.generated.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingWidgets.h"
|
||||
#include "WingUtils.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WidgetBlueprint.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFetcher.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingWidgets.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingWidgets.h"
|
||||
#include "Widget_SearchTypes.generated.h"
|
||||
|
||||
|
||||
@@ -216,14 +216,14 @@ TMap<FName, FName> UWingComponentReference::CalculateParentNames(USimpleConstruc
|
||||
|
||||
UActorComponent* UWingComponentReference::GetImmutableTemplate() const
|
||||
{
|
||||
if (Native) return FindComponentInCDO(BP->GeneratedClass, VariableName);
|
||||
USCS_Node *Node = FindSCSNodeByName(BP, VariableName);
|
||||
if (Node == nullptr) return nullptr;
|
||||
FComponentKey Key(Node);
|
||||
FoundComponent FC = FindComponent(BP, VariableName);
|
||||
if (FC.Native) return FC.Native;
|
||||
if (FC.SCS == nullptr) return nullptr;
|
||||
FComponentKey Key(FC.SCS);
|
||||
|
||||
for (UBlueprint *WalkBP : WingUtils::GetAncestorBlueprints(BP, false))
|
||||
{
|
||||
if (Node->GetSCS()->GetBlueprint() == WalkBP) return Node->ComponentTemplate;
|
||||
if (FC.SCS->GetSCS()->GetBlueprint() == WalkBP) return FC.SCS->ComponentTemplate;
|
||||
UInheritableComponentHandler* ICH = WalkBP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ false);
|
||||
if (!ICH) continue;
|
||||
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
||||
@@ -234,12 +234,12 @@ UActorComponent* UWingComponentReference::GetImmutableTemplate() const
|
||||
|
||||
UActorComponent* UWingComponentReference::GetMutableTemplate() const
|
||||
{
|
||||
if (Native) return FindComponentInCDO(BP->GeneratedClass, VariableName);
|
||||
USCS_Node* Node = FindSCSNodeByName(BP, VariableName);
|
||||
if (!Node) return nullptr;
|
||||
if (Node->GetSCS()->GetBlueprint() == BP) return Node->ComponentTemplate;
|
||||
FoundComponent FC = FindComponent(BP, VariableName);
|
||||
if (FC.Native) return FC.Native;
|
||||
if (!FC.SCS) return nullptr;
|
||||
if (FC.SCS->GetSCS()->GetBlueprint() == BP) return FC.SCS->ComponentTemplate;
|
||||
|
||||
FComponentKey Key(Node);
|
||||
FComponentKey Key(FC.SCS);
|
||||
UInheritableComponentHandler* ICH = BP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ true);
|
||||
if (!ICH) return nullptr;
|
||||
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
||||
@@ -267,13 +267,59 @@ TArray<UWingComponentReference*> UWingComponentReference::GetAll(UBlueprint* BP)
|
||||
UWingComponentReference* Ref = NewObject<UWingComponentReference>();
|
||||
Ref->BP = BP;
|
||||
Ref->VariableName = Comp->GetFName();
|
||||
Ref->TypeName = UWingTypes::TypeToText(Comp->GetClass());
|
||||
Result.Add(Ref);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Visit all SCS nodes, oldest first.
|
||||
for (UBlueprint *WalkBP : WingUtils::GetAncestorBlueprints(BP, true))
|
||||
{
|
||||
if (WalkBP->SimpleConstructionScript == nullptr) continue;
|
||||
for (USCS_Node* Node : WalkBP->SimpleConstructionScript->GetAllNodes())
|
||||
{
|
||||
UWingComponentReference* Ref = NewObject<UWingComponentReference>();
|
||||
Ref->BP = BP;
|
||||
Ref->VariableName = Node->GetVariableName();
|
||||
Result.Add(Ref);
|
||||
}
|
||||
}
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
void UWingComponentReference::PrintComponentInfo(const FString& TypeName, const FString& VarName, const FString& ParentName, bool Inherited, WingOut Out)
|
||||
{
|
||||
Out.Printf(TEXT(" %s %s"), *TypeName, *VarName);
|
||||
if (!ParentName.IsEmpty())
|
||||
Out.Printf(TEXT(" [parent: %s]"), *ParentName);
|
||||
if (Inherited)
|
||||
Out.Print(TEXT(" [inherited]"));
|
||||
Out.Print(TEXT("\n"));
|
||||
}
|
||||
|
||||
void UWingComponentReference::PrintAll(UBlueprint* BP, WingOut Out)
|
||||
{
|
||||
if (!BP) return;
|
||||
|
||||
// Find the native ancestor class
|
||||
UClass* NativeClass = FBlueprintEditorUtils::FindFirstNativeClass(BP->ParentClass);
|
||||
|
||||
// Native components from the native ancestor's CDO
|
||||
if (NativeClass)
|
||||
{
|
||||
if (AActor* CDO = Cast<AActor>(NativeClass->GetDefaultObject()))
|
||||
{
|
||||
TArray<UActorComponent*> NativeComponents;
|
||||
CDO->GetComponents(NativeComponents);
|
||||
for (UActorComponent* Comp : NativeComponents)
|
||||
{
|
||||
FString ParentName;
|
||||
if (USceneComponent* Scene = Cast<USceneComponent>(Comp))
|
||||
if (USceneComponent* AttachParent = Scene->GetAttachParent())
|
||||
Ref->ParentName = WingUtils::ExternalizeID(AttachParent->GetFName());
|
||||
Ref->Native = true;
|
||||
Ref->Inherited = true;
|
||||
Result.Add(Ref);
|
||||
ParentName = WingUtils::ExternalizeID(AttachParent->GetFName());
|
||||
PrintComponentInfo(UWingTypes::TypeToText(Comp->GetClass()),
|
||||
WingUtils::FormatName(Comp), ParentName, true, Out);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,17 +331,10 @@ TArray<UWingComponentReference*> UWingComponentReference::GetAll(UBlueprint* BP)
|
||||
TMap<FName, FName> ParentNames = CalculateParentNames(WalkBP->SimpleConstructionScript);
|
||||
for (USCS_Node* Node : WalkBP->SimpleConstructionScript->GetAllNodes())
|
||||
{
|
||||
UWingComponentReference* Ref = NewObject<UWingComponentReference>();
|
||||
Ref->BP = BP;
|
||||
Ref->VariableName = Node->GetVariableName();
|
||||
Ref->TypeName = UWingTypes::TypeToText(Node->ComponentClass);
|
||||
Ref->ParentName = WingUtils::ExternalizeID(ParentNames[Node->GetVariableName()]);
|
||||
Ref->Native = false;
|
||||
Ref->Inherited = (WalkBP != BP);
|
||||
Result.Add(Ref);
|
||||
FString ParentName = WingUtils::ExternalizeID(ParentNames[Node->GetVariableName()]);
|
||||
PrintComponentInfo(UWingTypes::TypeToText(Node->ComponentClass),
|
||||
WingUtils::ExternalizeID(Node->GetVariableName()),
|
||||
ParentName, WalkBP != BP, Out);
|
||||
}
|
||||
}
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "WingFetcher.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingActorComponent.h"
|
||||
#include "WingPinReference.h"
|
||||
#include "WingReferences.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
#include "EdGraph/EdGraph.h"
|
||||
#include "EdGraph/EdGraphNode.h"
|
||||
|
||||
@@ -13,23 +13,21 @@
|
||||
#include "MaterialGraph/MaterialGraphNode.h"
|
||||
#include "Kismet2/BlueprintEditorUtils.h"
|
||||
|
||||
WingGraphExport::WingGraphExport(UEdGraph* InGraph)
|
||||
: Graph(InGraph)
|
||||
WingGraphExport::WingGraphExport(UEdGraph* InGraph, bool Locals, bool Details)
|
||||
: Graph(InGraph), ShowLocals(Locals), ShowDetails(Details)
|
||||
{
|
||||
SortNodes();
|
||||
EmitLocalVariables();
|
||||
EmitDetails();
|
||||
EmitGraph();
|
||||
EmitComments();
|
||||
}
|
||||
|
||||
WingGraphExport::WingGraphExport(UEdGraphNode* InNode)
|
||||
: Graph(InNode->GetGraph())
|
||||
WingGraphExport::WingGraphExport(UEdGraphNode* InNode, bool Locals, bool Details)
|
||||
: Graph(InNode->GetGraph()), ShowLocals(Locals), ShowDetails(Details)
|
||||
{
|
||||
SortedNodes.Add(InNode);
|
||||
Visited.Add(InNode);
|
||||
EmitLocalVariables();
|
||||
EmitDetails();
|
||||
EmitGraph();
|
||||
EmitComments();
|
||||
}
|
||||
@@ -201,11 +199,25 @@ void WingGraphExport::EmitNode(UEdGraphNode* Node)
|
||||
{
|
||||
if (Node->IsA<UEdGraphNode_Comment>()) return;
|
||||
|
||||
Output.Appendf(TEXT("\nnode %s: %s\n"), *WingUtils::FormatName(Node), *WingUtils::FormatNodeTitle(Node));
|
||||
Output.Appendf(TEXT("node %s: %s\n"), *WingUtils::FormatName(Node), *WingUtils::FormatNodeTitle(Node));
|
||||
Output.Appendf(TEXT(" pos %d, %d\n"), Node->NodePosX, Node->NodePosY);
|
||||
|
||||
// Emit node properties (if applicable).
|
||||
EmitNodeProperties(Node, &Output, true);
|
||||
// Emit node properties.
|
||||
TArray<FWingProperty> Primary, Secondary;
|
||||
GetProperties(Node, Primary, Secondary);
|
||||
for (const FWingProperty &Prop : Primary) Prop.Print(Output);
|
||||
|
||||
// Emit secondary node properties.
|
||||
if (ShowDetails || Secondary.Num() < 2)
|
||||
{
|
||||
for (const FWingProperty &Prop : Secondary) Prop.Print(Output);
|
||||
}
|
||||
else if (Secondary.Num() > 0)
|
||||
{
|
||||
Output.Appendf(TEXT(" minor properties: %d\n"), Secondary.Num());
|
||||
SuppressedDetails = true;
|
||||
}
|
||||
|
||||
// Emit input data pins.
|
||||
for (UEdGraphPin* Pin : FilterPins(Node, EGPD_Input))
|
||||
{
|
||||
@@ -246,36 +258,37 @@ void WingGraphExport::EmitNode(UEdGraphNode* Node)
|
||||
else
|
||||
Output.Appendf(TEXT(" goto-if %s %s\n"), *WingUtils::FormatName(Pin), *Target);
|
||||
}
|
||||
|
||||
Output.Append(TEXT("\n"));
|
||||
}
|
||||
|
||||
void WingGraphExport::EmitNodeProperties(UEdGraphNode* Node, WingOut Out, bool bPrimary)
|
||||
void WingGraphExport::GetProperties(UEdGraphNode* Node,
|
||||
TArray<FWingProperty> &Primary, TArray<FWingProperty> &Secondary)
|
||||
{
|
||||
TArray<FWingProperty> Props = FWingProperty::GetDetails(Node, false);
|
||||
Primary = FWingProperty::GetDetails(Node, false);
|
||||
Secondary.Empty();
|
||||
|
||||
FString PrimaryCategory;
|
||||
if (UMaterialGraphNode* MatNode = Cast<UMaterialGraphNode>(Node))
|
||||
{
|
||||
PrimaryCategory = MatNode->MaterialExpression->GetClass()->GetName();
|
||||
for (const FWingProperty& P : Props)
|
||||
FString PrimaryCategory = MatNode->MaterialExpression->GetClass()->GetName();
|
||||
TArray<FWingProperty> NewPrimary;
|
||||
for (const FWingProperty& P : Primary)
|
||||
{
|
||||
FString Category = P.GetCategory();
|
||||
if ((Category == PrimaryCategory) == bPrimary)
|
||||
P.Print(Out);
|
||||
if (P.GetCategory() == PrimaryCategory) NewPrimary.Add(P);
|
||||
else Secondary.Add(P);
|
||||
}
|
||||
}
|
||||
else if (bPrimary)
|
||||
{
|
||||
for (const FWingProperty& P : Props)
|
||||
P.Print(Out);
|
||||
Swap(NewPrimary, Primary);
|
||||
}
|
||||
}
|
||||
|
||||
void WingGraphExport::EmitLocalVariables()
|
||||
{
|
||||
if (!ShowLocals) return;
|
||||
WingVariables Vars;
|
||||
Vars.SetBackingStore(Graph, WingOut::Stdout);
|
||||
Vars.Load(WingOut::Stdout);
|
||||
Vars.Print(Output);
|
||||
if (!Vars.IsEmpty()) Output.Append(TEXT("\n"));
|
||||
}
|
||||
|
||||
void WingGraphExport::EmitGraph()
|
||||
@@ -284,19 +297,6 @@ void WingGraphExport::EmitGraph()
|
||||
{
|
||||
EmitNode(Node);
|
||||
}
|
||||
Output.Append(TEXT("\n"));
|
||||
}
|
||||
|
||||
void WingGraphExport::EmitDetails()
|
||||
{
|
||||
for (UEdGraphNode* Node : SortedNodes)
|
||||
{
|
||||
if (Node->IsA<UEdGraphNode_Comment>()) continue;
|
||||
Details.Appendf(TEXT("\ndetails %s\n"), *WingUtils::FormatName(Node));
|
||||
Details.Appendf(TEXT(" pos %d, %d\n"), Node->NodePosX, Node->NodePosY);
|
||||
|
||||
EmitNodeProperties(Node, &Details, false);
|
||||
}
|
||||
}
|
||||
|
||||
void WingGraphExport::EmitComments()
|
||||
@@ -311,10 +311,10 @@ void WingGraphExport::EmitComments()
|
||||
int32 CH = CommentNode->NodeHeight;
|
||||
|
||||
// Emit header.
|
||||
Output.Appendf(TEXT("\ncomment %s:\n"), *WingUtils::FormatName(CommentNode));
|
||||
Output.Appendf(TEXT("comment %s:\n"), *WingUtils::FormatName(CommentNode));
|
||||
|
||||
// Emit wrapped, indented body.
|
||||
Output.Append(WingUtils::WrapText(CommentNode->NodeComment, 70, TEXT(" - ")));
|
||||
Output.Append(WingUtils::WrapText(CommentNode->NodeComment, 70, TEXT(" - ")));
|
||||
|
||||
// Find contained nodes.
|
||||
TArray<FString> ContainedNames;
|
||||
@@ -329,7 +329,16 @@ void WingGraphExport::EmitComments()
|
||||
|
||||
if (ContainedNames.Num() > 0)
|
||||
{
|
||||
Output.Appendf(TEXT(" applies to: %s\n"), *FString::Join(ContainedNames, TEXT(", ")));
|
||||
Output.Appendf(TEXT(" applies to: %s\n"), *FString::Join(ContainedNames, TEXT(", ")));
|
||||
}
|
||||
Output.Append(TEXT("\n"));
|
||||
}
|
||||
}
|
||||
|
||||
void WingGraphExport::EmitDetailsSuggestion()
|
||||
{
|
||||
if (SuppressedDetails)
|
||||
{
|
||||
Output.Appendf(TEXT("Minor node properties were suppressed, use details=true to show.\n\n"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "WingManual.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingTypes.h"
|
||||
|
||||
void WingManual::PrintHandlerPrototype(const FWingHandlerConfig& Handler)
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#include "WingPinReference.h"
|
||||
#include "WingUtils.h"
|
||||
#include "EdGraph/EdGraphNode.h"
|
||||
#include "EdGraph/EdGraphPin.h"
|
||||
|
||||
UEdGraphPin* UWingPinReference::GetPin() const
|
||||
{
|
||||
if (!Node) return nullptr;
|
||||
for (UEdGraphPin* Pin : Node->Pins)
|
||||
{
|
||||
if (Pin && Pin->GetFName() == PinName) return Pin;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
UEdGraphPin* UWingPinReference::CheckGetPin(WingOut Errors) const
|
||||
{
|
||||
if (!Node)
|
||||
{
|
||||
Errors.Print(TEXT("ERROR: Pin reference has no node\n"));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
UEdGraphPin* Pin = GetPin();
|
||||
if (!Pin)
|
||||
{
|
||||
Errors.Printf(TEXT("ERROR: Pin '%s' no longer exists on node '%s'\n"),
|
||||
*WingUtils::ExternalizeID(PinName), *WingUtils::FormatName(Node));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return Pin;
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "WingProperty.h"
|
||||
#include "WingActorComponent.h"
|
||||
#include "WingUtils.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingReferences.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingTypes.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "WingReferences.h"
|
||||
#include "WingUtils.h"
|
||||
#include "EdGraph/EdGraphNode.h"
|
||||
#include "EdGraph/EdGraphPin.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingProperty.h"
|
||||
#include "WingManual.h"
|
||||
#include "WingLogCapture.h"
|
||||
|
||||
@@ -148,7 +148,7 @@ FName WingTokenizer::TokenizeIdentifier(FStringView &Rest, FString &Error)
|
||||
if (Ch == ' ') break;
|
||||
if (Ch == '.')
|
||||
{
|
||||
if (Len < NAME_SIZE) Buffer[Len++] = Ch;
|
||||
if (Len < NAME_SIZE) Buffer[Len++] = ' ';
|
||||
Rest = Rest.RightChop(1);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "WingProperty.h"
|
||||
#include "WingTypes.h"
|
||||
#include "WingServer.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingTokenizer.h"
|
||||
#include "PropertyHandle.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
@@ -490,6 +490,24 @@ UObject *WingUtils::GetGeneratedCDO(UBlueprint *BP)
|
||||
return BP->GeneratedClass->GetDefaultObject();
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Graph Pin Helpers
|
||||
// ============================================================
|
||||
|
||||
UEdGraphPin* WingUtils::CheckGetPin(UEdGraphNode* Node, FName PinName, WingOut Errors)
|
||||
{
|
||||
for (UEdGraphPin* Pin : Node->Pins)
|
||||
{
|
||||
if (Pin && Pin->GetFName() == PinName)
|
||||
{
|
||||
return Pin;
|
||||
}
|
||||
}
|
||||
Errors.Printf(TEXT("ERROR: Pin '%s' no longer exists on node '%s'\n"),
|
||||
*WingUtils::ExternalizeID(PinName), *WingUtils::FormatName(Node));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Editor helpers
|
||||
// ============================================================
|
||||
|
||||
@@ -232,6 +232,14 @@ void WingVariables::Empty()
|
||||
OutputVariables.Empty();
|
||||
}
|
||||
|
||||
bool WingVariables::IsEmpty()
|
||||
{
|
||||
return (BlueprintVariables.IsEmpty() &&
|
||||
LocalVariables.IsEmpty() &&
|
||||
InputVariables.IsEmpty() &&
|
||||
OutputVariables.IsEmpty());
|
||||
}
|
||||
|
||||
void WingVariables::ClearLinks()
|
||||
{
|
||||
BlueprintVariables.ClearLinks();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingActorComponent.generated.h"
|
||||
|
||||
class UBlueprint;
|
||||
@@ -9,10 +9,8 @@ class USCS_Node;
|
||||
class UActorComponent;
|
||||
class USimpleConstructionScript;
|
||||
|
||||
// a 'Component Reference' is basically just a pointer to a
|
||||
// blueprint plus a component name. The other fields in here
|
||||
// are purely for convenience of printing things out, they
|
||||
// are *never* used for any analysis.
|
||||
// a 'Component Reference' is just a pointer to a
|
||||
// blueprint plus a component name.
|
||||
//
|
||||
UCLASS()
|
||||
class UWingComponentReference : public UObject
|
||||
@@ -27,26 +25,16 @@ public:
|
||||
// The component name.
|
||||
FName VariableName;
|
||||
|
||||
// Externalized Parent Name (for display only)
|
||||
FString ParentName;
|
||||
|
||||
// Externalized TypeName of the component (for display only)
|
||||
FString TypeName;
|
||||
|
||||
// True if the component is native (for display only)
|
||||
bool Native = false;
|
||||
|
||||
// True if the component was inherited (for display only)
|
||||
bool Inherited = false;
|
||||
|
||||
UActorComponent* GetImmutableTemplate() const;
|
||||
UActorComponent* GetMutableTemplate() const;
|
||||
|
||||
bool ReparentComponent(UWingComponentReference *Parent, WingOut Errors);
|
||||
bool DeleteComponent(WingOut Errors);
|
||||
static bool AddComponent(UBlueprint *BP, UClass *Class, UWingComponentReference *Parent, FName Name, WingOut Errors);
|
||||
static bool AddComponent(UBlueprint *BP, UClass *Class,
|
||||
UWingComponentReference *Parent, FName Name, WingOut Errors);
|
||||
|
||||
static TArray<UWingComponentReference*> GetAll(UBlueprint* BP);
|
||||
static void PrintAll(UBlueprint* BP, WingOut Out);
|
||||
|
||||
static bool CheckValidComponentClass(UClass *Class, WingOut Errors);
|
||||
private:
|
||||
@@ -67,5 +55,6 @@ private:
|
||||
static bool CheckOwnedByBlueprint(FoundComponent FC, UBlueprint *BP, WingOut Errors);
|
||||
static void AddChildNode(UBlueprint *BP, USCS_Node *Node, FoundComponent Parent);
|
||||
static TMap<FName, FName> CalculateParentNames(USimpleConstructionScript *Script);
|
||||
static void PrintComponentInfo(const FString& TypeName, const FString& VarName,
|
||||
const FString& ParentName, bool Inherited, WingOut Out);
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "UObject/Object.h"
|
||||
#include "UObject/StrongObjectPtr.h"
|
||||
#include "Dom/JsonObject.h"
|
||||
#include "WingHandler.generated.h"
|
||||
#include "WingBasics.generated.h"
|
||||
|
||||
// Marker struct for handler parameters that accept a JSON object.
|
||||
// PopulateFromJson stashes the actual JSON object into the Json field.
|
||||
@@ -108,27 +108,3 @@ struct FWingStructAndUStruct
|
||||
FWingStructAndUStruct(T *Struct) : StructPtr(Struct), UStructPtr(Struct->StaticStruct()) {}
|
||||
};
|
||||
|
||||
|
||||
// WingStructPointer: Allows us to store a pointer to a
|
||||
// ustruct in a variable of class UObject, through the magic
|
||||
// of an extra level of indirection. If the struct is part of
|
||||
// a UObject, then the Object field should be point at the
|
||||
// object to ensure it doesn't get garbage collected. If the
|
||||
// editable flag is false, it means the struct is for viewing
|
||||
// only.
|
||||
|
||||
UCLASS()
|
||||
class UWingStructPointer : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY()
|
||||
UObject* Object;
|
||||
|
||||
UPROPERTY()
|
||||
UStruct* StructType;
|
||||
|
||||
void *StructBase;
|
||||
|
||||
bool Editable;
|
||||
};
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "CoreMinimal.h"
|
||||
#include "Factories/Factory.h"
|
||||
#include "Factories/EnumFactory.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingFactories.generated.h"
|
||||
|
||||
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
class WingGraphExport
|
||||
{
|
||||
public:
|
||||
WingGraphExport(UEdGraph* InGraph);
|
||||
WingGraphExport(UEdGraphNode* InNode);
|
||||
WingGraphExport(UEdGraph* InGraph, bool Locals, bool Details);
|
||||
WingGraphExport(UEdGraphNode* InNode, bool Locals, bool Details);
|
||||
|
||||
const FString GetOutput() { return Output.ToString(); }
|
||||
const FString GetDetails() { return Details.ToString(); }
|
||||
|
||||
private:
|
||||
////////////////////////////////////////////////////////
|
||||
@@ -62,11 +61,12 @@ private:
|
||||
void Traverse(UEdGraphNode* Node);
|
||||
void SortNodes();
|
||||
void EmitNode(UEdGraphNode* Node);
|
||||
void EmitNodeProperties(UEdGraphNode* Node, WingOut Out, bool bPrimary);
|
||||
void EmitLocalVariables();
|
||||
void EmitGraph();
|
||||
void EmitDetails();
|
||||
void EmitComments();
|
||||
void EmitDetailsSuggestion();
|
||||
void GetProperties(UEdGraphNode *Node,
|
||||
TArray<FWingProperty> &Primary, TArray<FWingProperty> &Secondary);
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -74,8 +74,10 @@ private:
|
||||
//
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
UEdGraph* Graph;
|
||||
UEdGraph* Graph = nullptr;
|
||||
bool ShowLocals = false;
|
||||
bool ShowDetails = false;
|
||||
bool SuppressedDetails = false;
|
||||
|
||||
// Data populated by passes.
|
||||
TArray<UEdGraphNode*> SortedNodes;
|
||||
@@ -83,5 +85,4 @@ private:
|
||||
|
||||
// Output buffers.
|
||||
TStringBuilder<4096> Output;
|
||||
TStringBuilder<4096> Details;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "Containers/Set.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
|
||||
class WingManual
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "Materials/Material.h"
|
||||
#include "WingTokenizer.h"
|
||||
#include "Materials/MaterialInstanceConstant.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingParameterEditor.generated.h"
|
||||
|
||||
USTRUCT()
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/Object.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingPinReference.generated.h"
|
||||
|
||||
class UEdGraphNode;
|
||||
class UEdGraphPin;
|
||||
|
||||
UCLASS()
|
||||
class UWingPinReference : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY()
|
||||
UEdGraphNode* Node = nullptr;
|
||||
|
||||
FName PinName;
|
||||
|
||||
UEdGraphPin* GetPin() const;
|
||||
UEdGraphPin* CheckGetPin(WingOut Errors) const;
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingUtils.h"
|
||||
|
||||
// A resolved property: the FProperty descriptor plus a pointer to
|
||||
|
||||
66
Plugins/UEWingman/Source/UEWingman/Public/WingReferences.h
Normal file
66
Plugins/UEWingman/Source/UEWingman/Public/WingReferences.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/Object.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingReferences.generated.h"
|
||||
|
||||
class UEdGraphNode;
|
||||
class UEdGraphPin;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// The WingFetcher module allows you to start at an asset and
|
||||
// walk to any object within that asset. For example, you can
|
||||
// start at an actor blueprint, walk to its event graph, then
|
||||
// walk to a graph node, and then walk to a graph pin.
|
||||
//
|
||||
// The following classes make it possible to 'walk' to a
|
||||
// place that isn't a UObject, or that isn't a single UObject.
|
||||
// We accomplish this by creating a UObject class that
|
||||
// contains some sort of reference to the item in question.
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// WingStructPointer: Stores a pointer to a ustruct which is
|
||||
// inside a UObject. This makes it possible to walk to a
|
||||
// struct property.
|
||||
//
|
||||
// The Object field should be point at the containing object
|
||||
// to ensure it doesn't get garbage collected.
|
||||
//
|
||||
// The editable flag indicates whether the struct property
|
||||
// we walked into is marked CPF_Edit. If not, then the intent
|
||||
// is that this struct is for viewing only.
|
||||
|
||||
UCLASS()
|
||||
class UWingStructPointer : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UPROPERTY()
|
||||
UObject* Object;
|
||||
|
||||
UPROPERTY()
|
||||
UStruct* StructType;
|
||||
|
||||
void *StructBase;
|
||||
|
||||
bool Editable;
|
||||
};
|
||||
|
||||
// WingPinReference: Stores the name of a UEdGraphPin which is
|
||||
// inside a UEdGraphNode.
|
||||
|
||||
UCLASS()
|
||||
class UWingPinReference : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UPROPERTY()
|
||||
UEdGraphNode* Node = nullptr;
|
||||
|
||||
FName PinName;
|
||||
};
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "WingUtils.h"
|
||||
#include "WingNotifier.h"
|
||||
#include "WingLogCapture.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingManual.h"
|
||||
#include "WingServer.generated.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "CoreMinimal.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "CoreMinimal.h"
|
||||
#include "EditorSubsystem.h"
|
||||
#include "EdGraph/EdGraphPin.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
#include "WingTypes.generated.h"
|
||||
|
||||
struct WingTokenizer;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "Components/Widget.h"
|
||||
#include "WingActorComponent.h"
|
||||
#include "WingVariables.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
|
||||
struct FEdGraphSchemaAction;
|
||||
class UAnimationStateMachineGraph;
|
||||
@@ -195,7 +195,6 @@ public:
|
||||
static FString FormatName(const UWingComponentReference *Ref);
|
||||
static FString FormatName(const UWidget *Widget);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// static FString ExternalizeID(const FString& InternalID);
|
||||
static FString ExternalizeID(FName Name);
|
||||
@@ -248,6 +247,9 @@ public:
|
||||
static TArray<UBlueprint*> GetAncestorBlueprints(UBlueprint *BP, bool OldestFirst = false);
|
||||
static UObject *GetGeneratedCDO(UBlueprint *BP);
|
||||
|
||||
// ----- Graph pin helpers -----
|
||||
static UEdGraphPin* CheckGetPin(UEdGraphNode* Node, FName PinName, WingOut Errors);
|
||||
|
||||
// ----- Editor helpers -----
|
||||
static IAssetEditorInstance* CheckOpenEditorForAsset(UObject* Asset, WingOut Errors);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "CoreMinimal.h"
|
||||
#include "EdGraph/EdGraphPin.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
|
||||
struct WingTokenizer;
|
||||
class UK2Node_CustomEvent;
|
||||
@@ -51,9 +51,12 @@ public:
|
||||
// Constructor.
|
||||
WingVariableList(const TCHAR *MyListName) : ListName(MyListName) {}
|
||||
|
||||
// Return true if the variables are empty.
|
||||
// Empty the variable list.
|
||||
void Empty() { Variables.Empty(); }
|
||||
|
||||
// Return true if the variables are empty.
|
||||
bool IsEmpty() { return Variables.IsEmpty(); }
|
||||
|
||||
// Print the variables to a string builder.
|
||||
void Print(WingOut Out);
|
||||
|
||||
@@ -107,6 +110,10 @@ public:
|
||||
|
||||
void Empty();
|
||||
|
||||
// Return true if there are any variables in the workspace.
|
||||
//
|
||||
bool IsEmpty();
|
||||
|
||||
// Clear the BPVar and Pin fields.
|
||||
|
||||
void ClearLinks();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/Widget.h"
|
||||
#include "WingHandler.h"
|
||||
#include "WingBasics.h"
|
||||
|
||||
class UWidgetTree;
|
||||
struct FAssetData;
|
||||
|
||||
Reference in New Issue
Block a user