You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Added FunctionLibrary and FunctionReferenceNode classes Implemented support and validation for those in the Controller Implemented unit test for checking the validity of a FunctionReferenceNode. #rb jack.cai #jira UEA-564 [CL 15000860 by Helge Mathee in ue5-main branch]
63 lines
1.5 KiB
C++
63 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "RigVMModel/Nodes/RigVMFunctionReferenceNode.h"
|
|
#include "RigVMModel/RigVMFunctionLibrary.h"
|
|
|
|
FString URigVMFunctionReferenceNode::GetNodeTitle() const
|
|
{
|
|
if (URigVMLibraryNode* ReferencedNode = GetReferencedNode())
|
|
{
|
|
return ReferencedNode->GetNodeTitle();
|
|
}
|
|
return Super::GetNodeTitle();
|
|
}
|
|
|
|
FLinearColor URigVMFunctionReferenceNode::GetNodeColor() const
|
|
{
|
|
if (URigVMLibraryNode* ReferencedNode = GetReferencedNode())
|
|
{
|
|
return ReferencedNode->GetNodeColor();
|
|
}
|
|
return Super::GetNodeColor();
|
|
}
|
|
|
|
FText URigVMFunctionReferenceNode::GetToolTipText() const
|
|
{
|
|
if (URigVMLibraryNode* ReferencedNode = GetReferencedNode())
|
|
{
|
|
return ReferencedNode->GetToolTipText();
|
|
}
|
|
return Super::GetToolTipText();
|
|
}
|
|
|
|
URigVMFunctionLibrary* URigVMFunctionReferenceNode::GetLibrary() const
|
|
{
|
|
if(URigVMLibraryNode* ReferencedNode = GetReferencedNode())
|
|
{
|
|
return ReferencedNode->GetLibrary();
|
|
}
|
|
return nullptr;
|
|
}
|
|
|
|
URigVMGraph* URigVMFunctionReferenceNode::GetContainedGraph() const
|
|
{
|
|
if (URigVMLibraryNode* ReferencedNode = GetReferencedNode())
|
|
{
|
|
return ReferencedNode->GetContainedGraph();
|
|
}
|
|
return nullptr;
|
|
}
|
|
|
|
URigVMLibraryNode* URigVMFunctionReferenceNode::GetReferencedNode() const
|
|
{
|
|
if (!ReferencedNodePtr.IsValid())
|
|
{
|
|
ReferencedNodePtr.LoadSynchronous();
|
|
}
|
|
return ReferencedNodePtr.Get();
|
|
}
|
|
|
|
void URigVMFunctionReferenceNode::SetReferencedNode(URigVMLibraryNode* InReferenceNode)
|
|
{
|
|
ReferencedNodePtr = InReferenceNode;
|
|
} |