void UEdGraphSchema::TrySetDefaultText(UEdGraphPin& InPin, const FText& InNewDefaultText) const { if(InNewDefaultText.IsEmpty()) { InPin.DefaultTextValue = InNewDefaultText; } else { #if WITH_EDITOR if(InNewDefaultText.IsCultureInvariant()) { InPin.DefaultTextValue = InNewDefaultText; } else { InPin.DefaultTextValue = FText::ChangeKey(TEXT(""), InPin.GetOwningNode()->NodeGuid.ToString() + TEXT("_") + InPin.PinName, InNewDefaultText); } #endif } #if WITH_EDITOR UEdGraphNode* Node = InPin.GetOwningNode(); check(Node); Node->PinDefaultValueChanged(&InPin); #endif //#if WITH_EDITOR }
void UEdGraphSchema::TrySetDefaultValue(UEdGraphPin& Pin, const FString& NewDefaultValue) const { Pin.DefaultValue = NewDefaultValue; #if WITH_EDITOR UEdGraphNode* Node = Pin.GetOwningNode(); check(Node); Node->PinDefaultValueChanged(&Pin); #endif //#if WITH_EDITOR }
void UEdGraphSchema::TrySetDefaultObject(UEdGraphPin& Pin, UObject* NewDefaultObject) const { Pin.DefaultObject = NewDefaultObject; #if WITH_EDITOR UEdGraphNode* Node = Pin.GetOwningNode(); check(Node); Node->PinDefaultValueChanged(&Pin); #endif //#if WITH_EDITOR }
void UEdGraphSchema::TrySetDefaultText(UEdGraphPin& InPin, const FText& InNewDefaultText) const { InPin.DefaultTextValue = InNewDefaultText; #if WITH_EDITOR UEdGraphNode* Node = InPin.GetOwningNode(); check(Node); Node->PinDefaultValueChanged(&InPin); #endif //#if WITH_EDITOR }