2022-09-26 15:12:13 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
|
2022-10-01 02:04:57 -04:00
|
|
|
#include "MuT/NodeStringParameter.h"
|
2022-10-02 10:56:02 -04:00
|
|
|
|
|
|
|
|
#include "Misc/AssertionMacros.h"
|
|
|
|
|
#include "MuT/NodeImage.h"
|
|
|
|
|
#include "MuT/NodePrivate.h"
|
|
|
|
|
#include "MuT/NodeRange.h"
|
2022-10-01 02:04:57 -04:00
|
|
|
#include "MuT/NodeStringParameterPrivate.h"
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace mu
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Static initialisation
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2024-06-10 04:10:54 -04:00
|
|
|
FNodeType NodeStringParameter::Private::s_type = FNodeType(Node::EType::StringParameter, NodeString::GetStaticType() );
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
//!
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
MUTABLE_IMPLEMENT_NODE( NodeStringParameter )
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2023-11-02 04:40:17 -04:00
|
|
|
void NodeStringParameter::SetName( const FString& Name )
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
2023-11-02 04:40:17 -04:00
|
|
|
m_pD->m_name = Name;
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2023-11-02 04:40:17 -04:00
|
|
|
void NodeStringParameter::SetUid( const FString& Uid )
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
2023-11-02 04:40:17 -04:00
|
|
|
m_pD->m_uid = Uid;
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2023-11-02 04:40:17 -04:00
|
|
|
void NodeStringParameter::SetDefaultValue( const FString& v )
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
2023-11-02 04:40:17 -04:00
|
|
|
m_pD->m_defaultValue = v;
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeStringParameter::SetRangeCount( int i )
|
|
|
|
|
{
|
|
|
|
|
check(i>=0);
|
2022-10-11 05:14:05 -04:00
|
|
|
m_pD->m_ranges.SetNum(i);
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeStringParameter::SetRange( int i, NodeRangePtr pRange )
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
check( i>=0 && i<int(m_pD->m_ranges.Num()) );
|
|
|
|
|
if ( i>=0 && i<int(m_pD->m_ranges.Num()) )
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
|
|
|
|
m_pD->m_ranges[i] = pRange;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|