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/NodeImageSwitch.h"
|
2022-09-26 15:12:13 -04:00
|
|
|
|
2022-10-02 10:56:02 -04:00
|
|
|
#include "Misc/AssertionMacros.h"
|
|
|
|
|
#include "MuT/NodeImageSwitchPrivate.h"
|
|
|
|
|
#include "MuT/NodePrivate.h"
|
2022-10-01 02:04:57 -04:00
|
|
|
#include "MuT/NodeScalar.h"
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace mu
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Static initialisation
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2024-06-10 04:10:54 -04:00
|
|
|
FNodeType NodeImageSwitch::Private::s_type = FNodeType(Node::EType::ImageSwitch, NodeImage::GetStaticType() );
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
//!
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
MUTABLE_IMPLEMENT_NODE( NodeImageSwitch )
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Own Interface
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
NodeScalarPtr NodeImageSwitch::GetParameter() const
|
|
|
|
|
{
|
|
|
|
|
return m_pD->m_pParameter.get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeImageSwitch::SetParameter( NodeScalarPtr pNode )
|
|
|
|
|
{
|
|
|
|
|
m_pD->m_pParameter = pNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeImageSwitch::SetOptionCount( int t )
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
m_pD->m_options.SetNum(t);
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
int NodeImageSwitch::GetOptionCount() const
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
return int(m_pD->m_options.Num());
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
NodeImagePtr NodeImageSwitch::GetOption( int t ) const
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
check( t>=0 && t<(int)m_pD->m_options.Num() );
|
2022-09-26 15:12:13 -04:00
|
|
|
return m_pD->m_options[t].get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeImageSwitch::SetOption( int t, NodeImagePtr pNode )
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
check( t>=0 && t<(int)m_pD->m_options.Num() );
|
2022-09-26 15:12:13 -04:00
|
|
|
m_pD->m_options[t] = pNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|