MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / GetPinDisplayName

Method GetPinDisplayName

Source/FlowEditor/Private/Graph/FlowGraphSchema.cpp:771–807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771FText UFlowGraphSchema::GetPinDisplayName(const UEdGraphPin* Pin) const
772{
773 FText ResultPinName;
774 check(Pin != nullptr);
775 if (Pin->PinFriendlyName.IsEmpty())
776 {
777 // We don't want to display "None" for no name
778 if (Pin->PinName.IsNone())
779 {
780 return FText::GetEmpty();
781 }
782
783 // this option is only difference between this override and UEdGraphSchema::GetPinDisplayName
784 if (GetDefault<UFlowGraphEditorSettings>()->bEnforceFriendlyPinNames)
785 {
786 ResultPinName = FText::FromString(FName::NameToDisplayString(Pin->PinName.ToString(), true));
787 }
788 else
789 {
790 ResultPinName = FText::FromName(Pin->PinName);
791 }
792 }
793 else
794 {
795 ResultPinName = Pin->PinFriendlyName;
796
797 bool bShouldUseLocalizedNodeAndPinNames = false;
798 GConfig->GetBool(TEXT("Internationalization"), TEXT("ShouldUseLocalizedNodeAndPinNames"), bShouldUseLocalizedNodeAndPinNames, GEditorSettingsIni);
799
800 if (!bShouldUseLocalizedNodeAndPinNames)
801 {
802 ResultPinName = FText::FromString(ResultPinName.BuildSourceString());
803 }
804 }
805
806 return ResultPinName;
807}
808
809void UFlowGraphSchema::ConstructBasicPinTooltip(const UEdGraphPin& Pin, const FText& PinDescription, FString& TooltipOut) const
810{

Callers

nothing calls this directly

Calls 3

IsEmptyMethod · 0.80
IsNoneMethod · 0.80
ToStringMethod · 0.80

Tested by

no test coverage detected