41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Channels/FloatChannelKeyProxy.h"
|
|
#include "Channels/MovieSceneChannelHandle.h"
|
|
|
|
#include "HAL/PlatformCrt.h"
|
|
|
|
struct FPropertyChangedEvent;
|
|
|
|
void UFloatChannelKeyProxy::Initialize(FKeyHandle InKeyHandle, TMovieSceneChannelHandle<FMovieSceneFloatChannel> InChannelHandle, TWeakObjectPtr<UMovieSceneSection> InWeakSection)
|
|
{
|
|
KeyHandle = InKeyHandle;
|
|
ChannelHandle = InChannelHandle;
|
|
WeakSection = InWeakSection;
|
|
}
|
|
|
|
|
|
void UFloatChannelKeyProxy::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
|
|
{
|
|
FMovieSceneFloatValue NewValue = Value;
|
|
|
|
if (ChannelHandle.GetMetaData() != nullptr && ChannelHandle.GetMetaData()->bInvertValue)
|
|
{
|
|
NewValue.Value = -NewValue.Value;
|
|
}
|
|
|
|
Super::PostEditChangeProperty(PropertyChangedEvent);
|
|
|
|
OnProxyValueChanged(ChannelHandle, WeakSection.Get(), KeyHandle, NewValue, Time);
|
|
}
|
|
|
|
void UFloatChannelKeyProxy::UpdateValuesFromRawData()
|
|
{
|
|
RefreshCurrentValue(ChannelHandle, KeyHandle, Value, Time);
|
|
|
|
if (ChannelHandle.GetMetaData() != nullptr && ChannelHandle.GetMetaData()->bInvertValue)
|
|
{
|
|
Value.Value = -Value.Value;
|
|
}
|
|
}
|