You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb: none #fyi: Laurent.Delayen, Thomas.Sarkanen [CL 11088765 by Lina Halper in Main branch]
49 lines
1017 B
C++
49 lines
1017 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Animation/EditorNotifyObject.h"
|
|
#include "Animation/AnimSequenceBase.h"
|
|
|
|
UEditorNotifyObject::UEditorNotifyObject(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
{
|
|
|
|
}
|
|
|
|
bool UEditorNotifyObject::ApplyChangesToMontage()
|
|
{
|
|
if(AnimObject)
|
|
{
|
|
for(FAnimNotifyEvent& Notify : AnimObject->Notifies)
|
|
{
|
|
if(Notify.Guid == Event.Guid)
|
|
{
|
|
Event.OnChanged(Event.GetTime());
|
|
|
|
// If we have a duration this is a state notify
|
|
if(Event.GetDuration() > 0.0f)
|
|
{
|
|
Event.EndLink.OnChanged(Event.EndLink.GetTime());
|
|
|
|
// Always keep link methods in sync between notifies and duration links
|
|
if(Event.GetLinkMethod() != Event.EndLink.GetLinkMethod())
|
|
{
|
|
Event.EndLink.ChangeLinkMethod(Event.GetLinkMethod());
|
|
}
|
|
}
|
|
Notify = Event;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
void UEditorNotifyObject::InitialiseNotify(const FAnimNotifyEvent& InNotify)
|
|
{
|
|
if(AnimObject)
|
|
{
|
|
Event = InNotify;
|
|
}
|
|
}
|