You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Before: Total CPU Time: 53783.640625 s Total time in Parallel executor: 558.66 seconds After: Total CPU Time: 47886.140625 s Total time in Parallel executor: 498.81 seconds #jira [CL 22173145 by bryan sefcik in ue5-main branch]
68 lines
2.1 KiB
C++
68 lines
2.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "VisualGraphEdge.h"
|
|
#include "VisualGraph.h"
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(VisualGraphEdge)
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
/// FVisualGraphEdge
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
FString FVisualGraphEdge::DumpDot(const FVisualGraph* InGraph, int32 InIndendation) const
|
|
{
|
|
const FString Indentation = DumpDotIndentation(InIndendation);
|
|
const FString ColorContent = DumpDotColor(GetColor());
|
|
const FString StyleContent = DumpDotStyle(GetStyle());
|
|
|
|
static const FString DigraphConnector = TEXT("->");
|
|
static const FString GraphConnector = TEXT("--");
|
|
const FString& ConnectorContent = (GetDirection() == EVisualGraphEdgeDirection::BothWays) ? GraphConnector : DigraphConnector;
|
|
|
|
FString SourceNodeName = InGraph->GetNodes()[GetSourceNode()].GetName().ToString();
|
|
FString TargetNodeName = InGraph->GetNodes()[GetTargetNode()].GetName().ToString();
|
|
|
|
if(GetDirection() == EVisualGraphEdgeDirection::SourceToTarget)
|
|
{
|
|
Swap(SourceNodeName, TargetNodeName);
|
|
}
|
|
|
|
FString AttributeContent;
|
|
if(DisplayName.IsSet())
|
|
{
|
|
AttributeContent += FString::Printf(TEXT("label = \"%s\""), *DisplayName.GetValue().ToString());
|
|
}
|
|
if(Tooltip.IsSet())
|
|
{
|
|
if(!AttributeContent.IsEmpty())
|
|
{
|
|
AttributeContent += TEXT(", ");
|
|
}
|
|
AttributeContent += FString::Printf(TEXT("tooltip = \"%s\""), *Tooltip.GetValue());
|
|
}
|
|
if(!ColorContent.IsEmpty())
|
|
{
|
|
if(!AttributeContent.IsEmpty())
|
|
{
|
|
AttributeContent += TEXT(", ");
|
|
}
|
|
AttributeContent += FString::Printf(TEXT("color = %s"), *ColorContent);
|
|
}
|
|
if(!StyleContent.IsEmpty())
|
|
{
|
|
if(!AttributeContent.IsEmpty())
|
|
{
|
|
AttributeContent += TEXT(", ");
|
|
}
|
|
AttributeContent += FString::Printf(TEXT("style = %s"), *StyleContent);
|
|
}
|
|
|
|
if(!AttributeContent.IsEmpty())
|
|
{
|
|
AttributeContent = FString::Printf(TEXT(" [ %s ]"), *AttributeContent);
|
|
}
|
|
|
|
return FString::Printf(TEXT("%s%s %s %s%s;\n"),
|
|
*Indentation, *SourceNodeName, *ConnectorContent, *TargetNodeName, *AttributeContent);
|
|
}
|