Files
alexei lebedev 2815323fbc [mutable] Moved the Mutable plugin out of Experimental status into Beta.
#jira UE-223488
#rb jordi.rovira
#tests Editor
#rnx

#virtualized

[CL 36035608 by alexei lebedev in ue5-main branch]
2024-09-05 07:16:19 -04:00

76 lines
2.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MuT/NodeMeshVariation.h"
#include "Misc/AssertionMacros.h"
#include "MuT/NodeMeshVariationPrivate.h"
#include "MuT/NodePrivate.h"
namespace mu
{
//---------------------------------------------------------------------------------------------
// Static initialisation
//---------------------------------------------------------------------------------------------
FNodeType NodeMeshVariation::Private::s_type = FNodeType(Node::EType::MeshVariation, NodeMesh::GetStaticType() );
//---------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
MUTABLE_IMPLEMENT_NODE( NodeMeshVariation )
//---------------------------------------------------------------------------------------------
// Own Interface
//---------------------------------------------------------------------------------------------
void NodeMeshVariation::SetDefaultMesh( NodeMesh* p )
{
m_pD->m_defaultMesh = p;
}
//---------------------------------------------------------------------------------------------
int NodeMeshVariation::GetVariationCount() const
{
return m_pD->m_variations.Num();
}
//---------------------------------------------------------------------------------------------
void NodeMeshVariation::SetVariationCount( int num )
{
check( num >= 0 );
m_pD->m_variations.SetNum( num );
}
//---------------------------------------------------------------------------------------------
void NodeMeshVariation::SetVariationTag( int index, const char* strTag )
{
check( index >= 0 && index < m_pD->m_variations.Num() );
check( strTag );
if ( strTag )
{
m_pD->m_variations[index].m_tag = strTag;
}
else
{
m_pD->m_variations[index].m_tag = "";
}
}
//---------------------------------------------------------------------------------------------
void NodeMeshVariation::SetVariationMesh( int index, NodeMesh* pNode )
{
check( index >= 0 && index < m_pD->m_variations.Num() );
m_pD->m_variations[index].m_mesh = pNode;
}
} // namespace mu