Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Private/MetasoundInputNode.cpp
phil popp c49dfb1c4d MetaSound: Add constructor inputs / outputs to frontend nodes
#rb Helen.Yang
#jira UE-151659, UE-151662
#p4v-preflight-copy 20381225
#preflight 6298ca1eb72f596b0fcb2f07

[CL 20469618 by phil popp in ue5-main branch]
2022-06-02 10:50:07 -04:00

46 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MetasoundInputNode.h"
#include "MetasoundDataReference.h"
#include "MetasoundVertex.h"
#include "MetasoundVertexData.h"
#include "UObject/NameTypes.h"
namespace Metasound
{
FDataReferenceCollection FInputValueOperator::GetInputs() const
{
checkNoEntry();
return {};
}
FDataReferenceCollection FInputValueOperator::GetOutputs() const
{
checkNoEntry();
return {};
}
void FInputValueOperator::Bind(FVertexInterfaceData& InVertexData) const
{
if (const FAnyDataReference* Ref = InVertexData.GetInputs().FindDataReference(VertexName))
{
checkf(EDataReferenceAccessType::Value == Ref->GetAccessType(), TEXT("Expected bound reference to have %s access. Actual access was %s"), *LexToString(EDataReferenceAccessType::Value), *LexToString(Ref->GetAccessType()));
// Pass through input to output
InVertexData.GetOutputs().BindVertex(VertexName, *Ref);
}
else
{
// Use stored default value
InVertexData.GetInputs().BindVertex(VertexName, Default);
InVertexData.GetOutputs().BindVertex(VertexName, Default);
}
}
IOperator::FExecuteFunction FInputValueOperator::GetExecuteFunction()
{
return nullptr;
}
}