2019-12-27 09:26:59 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2018-04-12 16:57:51 -04:00
|
|
|
|
2019-01-08 11:38:48 -05:00
|
|
|
#include "Graph/ControlRigGraphNode.h"
|
|
|
|
|
#include "Graph/ControlRigGraph.h"
|
|
|
|
|
#include "Graph/ControlRigGraphSchema.h"
|
2023-06-15 11:30:29 -04:00
|
|
|
#include "IControlRigEditorModule.h"
|
2018-04-12 16:57:51 -04:00
|
|
|
|
2022-09-28 01:06:15 -04:00
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(ControlRigGraphNode)
|
|
|
|
|
|
2018-04-12 16:57:51 -04:00
|
|
|
#define LOCTEXT_NAMESPACE "ControlRigGraphNode"
|
|
|
|
|
|
2019-04-09 16:29:40 -04:00
|
|
|
UControlRigGraphNode::UControlRigGraphNode()
|
2023-06-15 11:30:29 -04:00
|
|
|
: URigVMEdGraphNode()
|
2019-04-09 16:29:40 -04:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-20 05:20:27 -04:00
|
|
|
#if WITH_EDITOR
|
|
|
|
|
|
|
|
|
|
void UControlRigGraphNode::AddPinSearchMetaDataInfo(const UEdGraphPin* Pin, TArray<FSearchTagDataPair>& OutTaggedMetaData) const
|
|
|
|
|
{
|
|
|
|
|
Super::AddPinSearchMetaDataInfo(Pin, OutTaggedMetaData);
|
|
|
|
|
|
|
|
|
|
if(const URigVMPin* ModelPin = FindModelPinFromGraphPin(Pin))
|
|
|
|
|
{
|
|
|
|
|
if(ModelPin->GetCPPTypeObject() == FRigElementKey::StaticStruct())
|
|
|
|
|
{
|
|
|
|
|
const FString DefaultValue = ModelPin->GetDefaultValue();
|
|
|
|
|
if(!DefaultValue.IsEmpty())
|
|
|
|
|
{
|
|
|
|
|
FString RigElementKeys;
|
|
|
|
|
if(ModelPin->IsArray())
|
|
|
|
|
{
|
|
|
|
|
RigElementKeys = DefaultValue;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
RigElementKeys = FString::Printf(TEXT("(%s)"), *DefaultValue);
|
|
|
|
|
}
|
|
|
|
|
if(!RigElementKeys.IsEmpty())
|
|
|
|
|
{
|
|
|
|
|
RigElementKeys.ReplaceInline(TEXT("="), TEXT(","));
|
|
|
|
|
RigElementKeys.ReplaceInline(TEXT("\""), TEXT(""));
|
|
|
|
|
OutTaggedMetaData.Emplace(FText::FromString(TEXT("Rig Items")), FText::FromString(RigElementKeys));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-04-12 16:57:51 -04:00
|
|
|
#undef LOCTEXT_NAMESPACE
|
2022-09-28 01:06:15 -04:00
|
|
|
|