You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Copying //Tasks/UE5/Dev-SequencerMVVM2 to Main (//UE5/Main) @20364093 #preflight 628866dfb94f739b152c1e29 #preflight 628866e4585e8f793ee80943 #rb ludovic.chabant, andrew.rodham #fyi ludovic.chabant, andrew.rodham, andrew.porter #jira UE-105322 [CL 20364493 by Max Chen in ue5-main branch]
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "MovieScenePossessable.h"
|
|
#include "MovieSceneSpawnableAnnotation.h"
|
|
#include "MovieSceneSequence.h"
|
|
#include "MovieSceneSequenceID.h"
|
|
#include "MovieScene.h"
|
|
#include "IMovieScenePlayer.h"
|
|
#include "EventHandlers/ISequenceDataEventHandler.h"
|
|
|
|
bool FMovieScenePossessable::BindSpawnableObject(FMovieSceneSequenceID SequenceID, UObject* Object, IMovieScenePlayer* Player)
|
|
{
|
|
TOptional<FMovieSceneSpawnableAnnotation> Spawnable = FMovieSceneSpawnableAnnotation::Find(Object);
|
|
if (Spawnable.IsSet())
|
|
{
|
|
// Check whether the spawnable is underneath the current sequence, if so, we can remap it to a local sequence ID
|
|
SetSpawnableObjectBindingID(UE::MovieScene::FRelativeObjectBindingID(SequenceID, Spawnable->SequenceID, Spawnable->ObjectBindingID, *Player));
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
void FMovieScenePossessable::SetParent(const FGuid& InParentGuid)
|
|
{
|
|
ParentGuid = InParentGuid;
|
|
}
|
|
|
|
void FMovieScenePossessable::SetParent(const FGuid& InParentGuid, UMovieScene* Owner)
|
|
{
|
|
if (ParentGuid != InParentGuid)
|
|
{
|
|
ParentGuid = InParentGuid;
|
|
Owner->EventHandlers.Trigger(&UE::MovieScene::ISequenceDataEventHandler::OnBindingParentChanged, Guid, InParentGuid);
|
|
}
|
|
} |