Graph_Dump no longer elides Knot and VariableGet nodes.
This commit is contained in:
@@ -48,7 +48,7 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UWingServer::Printf(TEXT("Note: use bDetails=true to see suppressed details."));
|
UWingServer::Printf(TEXT("\nNote: use bDetails=true to see suppressed details."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
#include "EdGraph/EdGraphNode.h"
|
#include "EdGraph/EdGraphNode.h"
|
||||||
#include "EdGraph/EdGraphPin.h"
|
#include "EdGraph/EdGraphPin.h"
|
||||||
#include "EdGraphSchema_K2.h"
|
#include "EdGraphSchema_K2.h"
|
||||||
#include "K2Node_Knot.h"
|
|
||||||
#include "EdGraphNode_Comment.h"
|
#include "EdGraphNode_Comment.h"
|
||||||
#include "K2Node_VariableGet.h"
|
|
||||||
#include "K2Node_CallFunction.h"
|
#include "K2Node_CallFunction.h"
|
||||||
#include "K2Node_FunctionEntry.h"
|
#include "K2Node_FunctionEntry.h"
|
||||||
#include "WingFunctionArgs.h"
|
#include "WingFunctionArgs.h"
|
||||||
@@ -44,14 +42,9 @@ WingGraphExport::WingGraphExport(UEdGraphNode* InNode)
|
|||||||
|
|
||||||
UEdGraphPin* WingGraphExport::GetLinkedTo(UEdGraphPin* Pin)
|
UEdGraphPin* WingGraphExport::GetLinkedTo(UEdGraphPin* Pin)
|
||||||
{
|
{
|
||||||
while (true)
|
if (Pin == nullptr) return nullptr;
|
||||||
{
|
if (Pin->LinkedTo.IsEmpty()) return nullptr;
|
||||||
if (Pin == nullptr) return nullptr;
|
return Pin->LinkedTo[0];
|
||||||
if (Pin->LinkedTo.IsEmpty()) return nullptr;
|
|
||||||
UEdGraphPin *LinkedTo = Pin->LinkedTo[0];
|
|
||||||
if (!LinkedTo->GetOwningNode()->IsA<UK2Node_Knot>()) return LinkedTo;
|
|
||||||
Pin = FindFirstPin(LinkedTo->GetOwningNode(), Pin->Direction);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WingGraphExport::IsDefaultToSelf(UEdGraphPin* Pin)
|
bool WingGraphExport::IsDefaultToSelf(UEdGraphPin* Pin)
|
||||||
@@ -113,11 +106,6 @@ FString WingGraphExport::FormatPinSource(UEdGraphPin* Pin)
|
|||||||
if (LinkedTo != nullptr)
|
if (LinkedTo != nullptr)
|
||||||
{
|
{
|
||||||
UEdGraphNode* LinkedToNode = LinkedTo->GetOwningNode();
|
UEdGraphNode* LinkedToNode = LinkedTo->GetOwningNode();
|
||||||
|
|
||||||
// For variable get nodes, just show the variable name.
|
|
||||||
if (UK2Node_VariableGet* VarGet = Cast<UK2Node_VariableGet>(LinkedToNode))
|
|
||||||
return WingUtils::FormatName(VarGet->VariableReference);
|
|
||||||
|
|
||||||
FString PinLabel = WingUtils::FormatName(LinkedTo);
|
FString PinLabel = WingUtils::FormatName(LinkedTo);
|
||||||
return FString::Printf(TEXT("%s.%s"), *WingUtils::FormatName(LinkedToNode), *PinLabel);
|
return FString::Printf(TEXT("%s.%s"), *WingUtils::FormatName(LinkedToNode), *PinLabel);
|
||||||
}
|
}
|
||||||
@@ -320,8 +308,6 @@ void WingGraphExport::EmitGraph()
|
|||||||
{
|
{
|
||||||
for (UEdGraphNode* Node : SortedNodes)
|
for (UEdGraphNode* Node : SortedNodes)
|
||||||
{
|
{
|
||||||
if (Node->IsA<UK2Node_Knot>()) continue;
|
|
||||||
if (Node->IsA<UK2Node_VariableGet>()) continue;
|
|
||||||
EmitNode(Node);
|
EmitNode(Node);
|
||||||
}
|
}
|
||||||
Output.Append(TEXT("\n"));
|
Output.Append(TEXT("\n"));
|
||||||
@@ -331,9 +317,7 @@ void WingGraphExport::EmitDetails()
|
|||||||
{
|
{
|
||||||
for (UEdGraphNode* Node : SortedNodes)
|
for (UEdGraphNode* Node : SortedNodes)
|
||||||
{
|
{
|
||||||
if (Node->IsA<UK2Node_Knot>()) continue;
|
|
||||||
if (Node->IsA<UEdGraphNode_Comment>()) continue;
|
if (Node->IsA<UEdGraphNode_Comment>()) continue;
|
||||||
if (Node->IsA<UK2Node_VariableGet>()) continue;
|
|
||||||
Details.Appendf(TEXT("\ndetails %s\n"), *WingUtils::FormatName(Node));
|
Details.Appendf(TEXT("\ndetails %s\n"), *WingUtils::FormatName(Node));
|
||||||
Details.Appendf(TEXT(" pos %d, %d\n"), Node->NodePosX, Node->NodePosY);
|
Details.Appendf(TEXT(" pos %d, %d\n"), Node->NodePosX, Node->NodePosY);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user