You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-85567 #rb Matt.Hoffman #rnx #ROBOMERGE-SOURCE: CL 11074040 via CL 11074041 #ROBOMERGE-BOT: (v637-11041722) [CL 11074042 by lauren barnes in Main branch]
31 lines
889 B
C++
31 lines
889 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "CurveModel.h"
|
|
#include "Containers/Array.h"
|
|
#include "CurveDataAbstraction.h"
|
|
|
|
void FCurveModel::SetKeyAttributes(TArrayView<const FKeyHandle> InKeys, const FKeyAttributes& InKeyAttributes, EPropertyChangeType::Type ChangeType)
|
|
{
|
|
TArray<FKeyAttributes> ExpandedAttributes;
|
|
ExpandedAttributes.Reserve(InKeys.Num());
|
|
|
|
for (FKeyHandle Handle : InKeys)
|
|
{
|
|
ExpandedAttributes.Add(InKeyAttributes);
|
|
}
|
|
|
|
SetKeyAttributes(InKeys, ExpandedAttributes);
|
|
}
|
|
|
|
TOptional<FKeyHandle> FCurveModel::AddKey(const FKeyPosition& NewKeyPosition, const FKeyAttributes& InAttributes)
|
|
{
|
|
Modify();
|
|
|
|
TOptional<FKeyHandle> Handle;
|
|
|
|
TArrayView<TOptional<FKeyHandle>> Handles = MakeArrayView(&Handle, 1);
|
|
AddKeys(TArrayView<const FKeyPosition>(&NewKeyPosition, 1), TArrayView<const FKeyAttributes>(&InAttributes, 1), &Handles);
|
|
|
|
return Handle;
|
|
}
|