Files
UnrealEngineUWP/Engine/Plugins/Mutable/Source/MutableTools/Private/MuT/NodeObjectGroup.cpp
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

115 lines
3.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MuT/NodeObjectGroup.h"
#include "HAL/PlatformCrt.h"
#include "Misc/AssertionMacros.h"
#include "MuT/NodeLayout.h"
#include "MuT/NodeObjectGroupPrivate.h"
#include "MuT/NodeObjectPrivate.h"
#include "MuT/NodePrivate.h"
namespace mu
{
MUTABLE_IMPLEMENT_ENUM_SERIALISABLE(NodeObjectGroup::CHILD_SELECTION)
//---------------------------------------------------------------------------------------------
// Static initialisation
//---------------------------------------------------------------------------------------------
FNodeType NodeObjectGroup::Private::s_type = FNodeType(Node::EType::ObjectGroup, NodeObject::GetStaticType() );
//---------------------------------------------------------------------------------------------
//!
//---------------------------------------------------------------------------------------------
MUTABLE_IMPLEMENT_NODE( NodeObjectGroup )
//---------------------------------------------------------------------------------------------
// Own Interface
//---------------------------------------------------------------------------------------------
const FString& NodeObjectGroup::GetName() const
{
return m_pD->Name;
}
//---------------------------------------------------------------------------------------------
void NodeObjectGroup::SetName( const FString& Name )
{
m_pD->Name = Name;
}
const FString& NodeObjectGroup::GetUid() const
{
return m_pD->Uid;
}
//---------------------------------------------------------------------------------------------
void NodeObjectGroup::SetUid( const FString& Uid )
{
m_pD->Uid = Uid;
}
//---------------------------------------------------------------------------------------------
NodeObjectGroup::CHILD_SELECTION NodeObjectGroup::GetSelectionType() const
{
return m_pD->m_type;
}
//---------------------------------------------------------------------------------------------
void NodeObjectGroup::SetSelectionType( CHILD_SELECTION t )
{
m_pD->m_type = t;
}
//---------------------------------------------------------------------------------------------
int NodeObjectGroup::GetChildCount() const
{
return m_pD->m_children.Num();
}
//---------------------------------------------------------------------------------------------
void NodeObjectGroup::SetChildCount( int num )
{
check( num >=0 );
m_pD->m_children.SetNum( num );
}
//---------------------------------------------------------------------------------------------
NodeObjectPtr NodeObjectGroup::GetChild( int index ) const
{
check( index >=0 && index < m_pD->m_children.Num() );
return m_pD->m_children[ index ].get();
}
//---------------------------------------------------------------------------------------------
void NodeObjectGroup::SetChild( int index, NodeObjectPtr pObject )
{
check( index >=0 && index < m_pD->m_children.Num() );
m_pD->m_children[ index ] = pObject;
}
void NodeObjectGroup::SetDefaultValue(int32 Value)
{
m_pD->DefaultValue = Value;
}
}