2023-08-03 12:40:31 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "MuT/NodeExtensionDataVariation.h"
|
|
|
|
|
|
|
|
|
|
#include "Misc/AssertionMacros.h"
|
|
|
|
|
|
|
|
|
|
namespace mu
|
|
|
|
|
{
|
2024-06-10 04:10:54 -04:00
|
|
|
FNodeType NodeExtensionDataVariation::StaticType = FNodeType(Node::EType::ExtensionDataVariation, NodeExtensionData::GetStaticType());
|
2023-08-03 12:40:31 -04:00
|
|
|
|
|
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
void NodeExtensionDataVariation::SetDefaultValue(Ptr<NodeExtensionData> InValue)
|
2023-08-03 12:40:31 -04:00
|
|
|
{
|
2024-06-10 04:10:54 -04:00
|
|
|
DefaultValue = InValue;
|
2023-08-03 12:40:31 -04:00
|
|
|
}
|
|
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
void NodeExtensionDataVariation::SetVariationCount(int32 InCount)
|
2023-08-03 12:40:31 -04:00
|
|
|
{
|
|
|
|
|
check(InCount >= 0);
|
2024-06-10 04:10:54 -04:00
|
|
|
Variations.SetNum(InCount);
|
2023-08-03 12:40:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int NodeExtensionDataVariation::GetVariationCount() const
|
|
|
|
|
{
|
2024-06-10 04:10:54 -04:00
|
|
|
return Variations.Num();
|
2023-08-03 12:40:31 -04:00
|
|
|
}
|
|
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
void NodeExtensionDataVariation::SetVariationTag(int32 InIndex, const FString& Tag)
|
2023-08-03 12:40:31 -04:00
|
|
|
{
|
2024-06-10 04:10:54 -04:00
|
|
|
check(Variations.IsValidIndex(InIndex));
|
2023-08-03 12:40:31 -04:00
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
Variations[InIndex].Tag = Tag;
|
2023-08-03 12:40:31 -04:00
|
|
|
}
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2024-06-10 04:10:54 -04:00
|
|
|
void NodeExtensionDataVariation::SetVariationValue(int32 InIndex, Ptr<NodeExtensionData> InValue)
|
2023-08-03 12:40:31 -04:00
|
|
|
{
|
2024-06-10 04:10:54 -04:00
|
|
|
check(Variations.IsValidIndex(InIndex));
|
2023-08-03 12:40:31 -04:00
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
Variations[InIndex].Value = InValue;
|
2023-08-03 12:40:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|