You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- IMovieSceneAnimation derivatives are now the primary types consumed by Sequencer; they hold a root MovieScene inside - Object binding managers have been removed; bindings are persisted in UActorAnimation, UNiagaraAnimation, UWidgetAnimation - MovieSceneAssetEditor is now ActorAnimationEditor and became a plug-in - MovieSceneRuntimePlayer is now ActorAnimationPlayer; K2Node_PlayMovieScene has been removed #CodeReview: matt.kuhlenschmidt, frank.fella, nick.darnell, olaf.piesche, max.chen, andrew.rodham [CL 2628945 by Max Preussner in Main branch]
54 lines
1016 B
C++
54 lines
1016 B
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "ActorAnimationPrivatePCH.h"
|
|
#include "ActorAnimationObject.h"
|
|
|
|
|
|
/* FSequencerPossessedObject interface
|
|
*****************************************************************************/
|
|
|
|
UObject* FActorAnimationObject::GetObject() const
|
|
{
|
|
// get component-less object
|
|
if (ComponentName.IsEmpty())
|
|
{
|
|
return ObjectOrOwner.Get();
|
|
}
|
|
|
|
// get cached component
|
|
if ((CachedComponent != nullptr) && (CachedComponent->GetName() == ComponentName))
|
|
{
|
|
return CachedComponent;
|
|
}
|
|
|
|
CachedComponent = nullptr;
|
|
|
|
// find & cache component
|
|
UObject* Object = ObjectOrOwner.Get();
|
|
|
|
if (Object == nullptr)
|
|
{
|
|
return nullptr;
|
|
}
|
|
|
|
AActor* Owner = Cast<AActor>(Object);
|
|
|
|
if (Owner == nullptr)
|
|
{
|
|
return Object;
|
|
}
|
|
|
|
for (UActorComponent* ActorComponent : Owner->GetComponents())
|
|
{
|
|
if (ActorComponent->GetName() == ComponentName)
|
|
{
|
|
CachedComponent = ActorComponent;
|
|
|
|
return ActorComponent;
|
|
}
|
|
}
|
|
|
|
// component not found
|
|
return nullptr;
|
|
}
|