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/NodeObjectGroup.h"
|
2022-09-26 15:12:13 -04:00
|
|
|
|
2022-10-02 10:56:02 -04:00
|
|
|
#include "HAL/PlatformCrt.h"
|
|
|
|
|
#include "Misc/AssertionMacros.h"
|
2022-10-01 02:04:57 -04:00
|
|
|
#include "MuT/NodeLayout.h"
|
2022-10-02 10:56:02 -04:00
|
|
|
#include "MuT/NodeObjectGroupPrivate.h"
|
|
|
|
|
#include "MuT/NodeObjectPrivate.h"
|
|
|
|
|
#include "MuT/NodePrivate.h"
|
|
|
|
|
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
namespace mu
|
|
|
|
|
{
|
2023-04-18 07:17:36 -04:00
|
|
|
MUTABLE_IMPLEMENT_ENUM_SERIALISABLE(NodeObjectGroup::CHILD_SELECTION)
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Static initialisation
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2024-06-10 04:10:54 -04:00
|
|
|
FNodeType NodeObjectGroup::Private::s_type = FNodeType(Node::EType::ObjectGroup, NodeObject::GetStaticType() );
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
//!
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
MUTABLE_IMPLEMENT_NODE( NodeObjectGroup )
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Own Interface
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2023-09-26 04:43:37 -04:00
|
|
|
const FString& NodeObjectGroup::GetName() const
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
2023-09-26 04:43:37 -04:00
|
|
|
return m_pD->Name;
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2023-09-26 04:43:37 -04:00
|
|
|
void NodeObjectGroup::SetName( const FString& Name )
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
2023-09-26 04:43:37 -04:00
|
|
|
m_pD->Name = Name;
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-09-26 04:43:37 -04:00
|
|
|
const FString& NodeObjectGroup::GetUid() const
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
2023-09-26 04:43:37 -04:00
|
|
|
return m_pD->Uid;
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2023-09-26 04:43:37 -04:00
|
|
|
void NodeObjectGroup::SetUid( const FString& Uid )
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
2023-09-26 04:43:37 -04:00
|
|
|
m_pD->Uid = Uid;
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
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
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
return m_pD->m_children.Num();
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeObjectGroup::SetChildCount( int num )
|
|
|
|
|
{
|
|
|
|
|
check( num >=0 );
|
2022-10-11 05:14:05 -04:00
|
|
|
m_pD->m_children.SetNum( num );
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
NodeObjectPtr NodeObjectGroup::GetChild( int index ) const
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
check( index >=0 && index < m_pD->m_children.Num() );
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
return m_pD->m_children[ index ].get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeObjectGroup::SetChild( int index, NodeObjectPtr pObject )
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
check( index >=0 && index < m_pD->m_children.Num() );
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
m_pD->m_children[ index ] = pObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2024-01-16 03:23:52 -05:00
|
|
|
void NodeObjectGroup::SetDefaultValue(int32 Value)
|
|
|
|
|
{
|
|
|
|
|
m_pD->DefaultValue = Value;
|
|
|
|
|
}
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|