Files
UnrealEngineUWP/Engine/Source/Runtime/LevelSequence/Private/LevelSequenceActor.cpp
Andrew Grant d077828526 Copying //UE4/Orion-Staging to Dev-Main (Originating from //Orion/Main at CL-2777663)
#lockdown Nick.Penwarden

 Change 2777555 on 2015/11/23 by Antony.Carter

	Friend List Sub Menu restyling to new designs

	#RB Nicholas.Davies
	#TESTS Check 3 sub menus of friends list (Online Status, Friends List, Settings) still function correctly with new styling.

Change 2777506 on 2015/11/23 by Andrew.Rodham

	Sequencer: Copy/Paste command binding is no longer active if the seuqnece widget is not focused

	This addresses UE-23423

	#tests Tested copy/paste inside and outside of sequencer
	#codereview Max.Chen
	#rb Max.Chen

Change 2777505 on 2015/11/23 by Andrew.Rodham

	Sequencer: Undoing the addition of a spawnable now ensures its actor instance is deleted correctly

	This addresses UE-23450

	#tests tested the repro steps on the bug
	#codereview Max.Chen
	#rb Max.Chen

Change 2777489 on 2015/11/23 by Andrew.Rodham

	Sequencer: Workflow optimizations for spawnables

	 - Editing a property on an instance of a spawnable now automatically propagates to the spawnable defaults, provided the property is not keyed
	 - Fixed a few cases where spawnables were left lingering around while scrubbing or switching between sub-sequences
	 - Fixed the root sequence instance being evaluated when there was a sub-sequence focused.
	 - Selection states are now remembered for spawnable objects when they are destroyed/re-spawned

	#codereview Max.Chen
	#tests tested loks of object types as spawnables in PIE and in editor
	#rb Max.Chen

Change 2777321 on 2015/11/23 by Terence.Burns

	Updated the usage of World->UpdateStreamingLevels to FlushStreaming levels on the advice of Dmitriy. Need this to ensure that the streaming is completed before we send it off to lightmass.

	#rb Dmitriy.Dyomin
	#Tests Run the RebuildLightmaps UAT script.

Change 2777091 on 2015/11/22 by Andrew.Grant

	Changed "inappropriate outmost" warning on package load to an error. At the very least we want this for a day or two on Orion to surface errors quickly, but may be a good thing to make a standard error since it indicates something that's likely broken.

	#rb none
	#tests Golden path in game, cooked content
	#codereview Nick.Penwarden, Michael.Noland

Change 2777037 on 2015/11/22 by Laurent.Delayen

	Additional debug info to track down https://jira.ol.epicgames.net/browse/OR-9675

	#rb martin.wilson
	#codereview martin.wilson
	#tests Golden path (PIE) + compiled for PS4

Change 2777030 on 2015/11/22 by Sam.Zamani

	#online,externalui,ps4
	- added footer option for closing the embedded web browser

	#rb none
	#tests exec command to try on ps4

Change 2777019 on 2015/11/22 by Marcus.Wassmer

	Possible fix for OR-9851
	#rb none
	#test GoldenPath, PS4
	#codereview Nick.Darnell,Matt.Kuhlenschmidt

Change 2776932 on 2015/11/22 by Max.Chen

	Sequencer: Fix editor selection so that it's not modified in response to the sequencer outliner tree node changing selection if the user is not explicitly selecting in the tree.

	#RB none
	#tests Select an actor that Sequencer doesn't control and it shouldn't deselect.

Change 2776900 on 2015/11/21 by Marcus.Wassmer

	HighQuality particle lights.
	#rb Brian.Karis
	#test GoldenPath, HQ Particles w/wo ShadowCasting.
	#codereview Olaf.Piesche, Simon.Tovey, Tim.Elek

Change 2776868 on 2015/11/21 by Brian.Karis

	Reduced temporal aa responsiveness back where it was.

Change 2776867 on 2015/11/21 by Brian.Karis

	Removed shading terminator bias meant for shadow map acne but it made character faces look worse.

Change 2776840 on 2015/11/21 by Brian.Karis

	Hair indirect lighting implemented.

	Improvements to hair shading model. No longer uses backlit parameter.

	#rb marcus.wassmer
	#tests editor

Change 2776748 on 2015/11/21 by Max.Preussner

	Sequencer: Continued to implement track label editor

	Note: still disabled, because there are a couple remaining issues

	#codereview: max.chen
	#rb: max.chen
	#test: Editor, Runtime

Change 2776493 on 2015/11/20 by Max.Preussner

	Sequencer: Wrapped the node tree context menu actions for editing in an 'Edit' section

	#codereview: max.chen
	#rb: max.chen
2015-11-24 16:45:24 -05:00

93 lines
2.2 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "LevelSequencePCH.h"
#include "LevelSequenceActor.h"
ALevelSequenceActor::ALevelSequenceActor(const FObjectInitializer& Init)
: Super(Init)
{
#if WITH_EDITORONLY_DATA
UBillboardComponent* SpriteComponent = CreateEditorOnlyDefaultSubobject<UBillboardComponent>(TEXT("Sprite"));
if (!IsRunningCommandlet())
{
// Structure to hold one-time initialization
struct FConstructorStatics
{
ConstructorHelpers::FObjectFinderOptional<UTexture2D> DecalTexture;
FConstructorStatics() : DecalTexture(TEXT("/Engine/EditorResources/S_LevelSequence")) {}
};
static FConstructorStatics ConstructorStatics;
if (SpriteComponent)
{
SpriteComponent->Sprite = ConstructorStatics.DecalTexture.Get();
SpriteComponent->AttachParent = RootComponent;
SpriteComponent->bIsScreenSizeScaled = true;
SpriteComponent->bAbsoluteScale = true;
SpriteComponent->bReceivesDecals = false;
SpriteComponent->bHiddenInGame = true;
SetRootComponent(SpriteComponent);
}
}
#endif // WITH_EDITORONLY_DATA
PrimaryActorTick.bCanEverTick = true;
bAutoPlay = false;
}
void ALevelSequenceActor::BeginPlay()
{
Super::BeginPlay();
InitializePlayer();
}
#if WITH_EDITOR
bool ALevelSequenceActor::GetReferencedContentObjects(TArray<UObject*>& Objects) const
{
ULevelSequence* LevelSequenceAsset = Cast<ULevelSequence>(LevelSequence.TryLoad());
if (LevelSequenceAsset)
{
Objects.Add(LevelSequenceAsset);
}
Super::GetReferencedContentObjects(Objects);
return true;
}
#endif // WITH_EDITOR
void ALevelSequenceActor::Tick(float DeltaSeconds)
{
if (SequencePlayer)
{
SequencePlayer->Update(DeltaSeconds);
}
}
void ALevelSequenceActor::SetSequence(ULevelSequence* InSequence)
{
if (!SequencePlayer || !SequencePlayer->IsPlaying())
{
LevelSequence = InSequence;
InitializePlayer();
}
}
void ALevelSequenceActor::InitializePlayer()
{
ULevelSequence* LevelSequenceAsset = Cast<ULevelSequence>(LevelSequence.TryLoad());
if (GetWorld()->IsGameWorld() && LevelSequenceAsset)
{
SequencePlayer = NewObject<ULevelSequencePlayer>(this, "AnimationPlayer");
SequencePlayer->Initialize(LevelSequenceAsset, GetWorld(), PlaybackSettings);
if (bAutoPlay)
{
SequencePlayer->Play();
}
}
}