Files
UnrealEngineUWP/Engine/Source/Editor/Sequencer/Private/SequencerSettings.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

391 lines
8.5 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "SequencerPrivatePCH.h"
USequencerSettings::USequencerSettings( const FObjectInitializer& ObjectInitializer )
: Super( ObjectInitializer )
{
bAutoKeyEnabled = false;
bKeyAllEnabled = false;
bKeyInterpPropertiesOnly = false;
KeyInterpolation = EMovieSceneKeyInterpolation::Auto;
SpawnPosition = SSP_Origin;
bShowFrameNumbers = true;
bShowRangeSlider = false;
bIsSnapEnabled = true;
TimeSnapInterval = .05f;
bSnapKeyTimesToInterval = true;
bSnapKeyTimesToKeys = true;
bSnapSectionTimesToInterval = true;
bSnapSectionTimesToSections = true;
bSnapPlayTimeToInterval = true;
bSnapPlayTimeToDraggedKey = false;
CurveValueSnapInterval = 10.0f;
bSnapCurveValueToInterval = true;
bDetailsViewVisible = false;
bLabelBrowserVisible = false;
bAutoScrollEnabled = false;
bShowCurveEditor = false;
bShowCurveEditorCurveToolTips = true;
bLooping = false;
bKeepCursorInPlayRange = true;
}
bool USequencerSettings::GetAutoKeyEnabled() const
{
return bAutoKeyEnabled;
}
void USequencerSettings::SetAutoKeyEnabled(bool InbAutoKeyEnabled)
{
if ( bAutoKeyEnabled != InbAutoKeyEnabled )
{
bAutoKeyEnabled = InbAutoKeyEnabled;
SaveConfig();
}
}
bool USequencerSettings::GetKeyAllEnabled() const
{
return bKeyAllEnabled;
}
void USequencerSettings::SetKeyAllEnabled(bool InbKeyAllEnabled)
{
if ( bKeyAllEnabled != InbKeyAllEnabled )
{
bKeyAllEnabled = InbKeyAllEnabled;
SaveConfig();
}
}
bool USequencerSettings::GetKeyInterpPropertiesOnly() const
{
return bKeyInterpPropertiesOnly;
}
void USequencerSettings::SetKeyInterpPropertiesOnly(bool InbKeyInterpPropertiesOnly)
{
if ( bKeyInterpPropertiesOnly != InbKeyInterpPropertiesOnly )
{
bKeyInterpPropertiesOnly = InbKeyInterpPropertiesOnly;
SaveConfig();
}
}
EMovieSceneKeyInterpolation USequencerSettings::GetKeyInterpolation() const
{
return KeyInterpolation;
}
void USequencerSettings::SetKeyInterpolation(EMovieSceneKeyInterpolation InKeyInterpolation)
{
if ( KeyInterpolation != InKeyInterpolation)
{
KeyInterpolation = InKeyInterpolation;
SaveConfig();
}
}
ESequencerSpawnPosition USequencerSettings::GetSpawnPosition() const
{
return SpawnPosition;
}
void USequencerSettings::SetSpawnPosition(ESequencerSpawnPosition InSpawnPosition)
{
if ( SpawnPosition != InSpawnPosition)
{
SpawnPosition = InSpawnPosition;
SaveConfig();
}
}
bool USequencerSettings::GetShowFrameNumbers() const
{
return bShowFrameNumbers;
}
void USequencerSettings::SetShowFrameNumbers(bool InbShowFrameNumbers)
{
if ( bShowFrameNumbers != InbShowFrameNumbers )
{
bShowFrameNumbers = InbShowFrameNumbers;
SaveConfig();
}
}
bool USequencerSettings::GetShowRangeSlider() const
{
return bShowRangeSlider;
}
void USequencerSettings::SetShowRangeSlider(bool InbShowRangeSlider)
{
if ( bShowRangeSlider != InbShowRangeSlider )
{
bShowRangeSlider = InbShowRangeSlider;
SaveConfig();
}
}
bool USequencerSettings::GetIsSnapEnabled() const
{
return bIsSnapEnabled;
}
void USequencerSettings::SetIsSnapEnabled(bool InbIsSnapEnabled)
{
if ( bIsSnapEnabled != InbIsSnapEnabled )
{
bIsSnapEnabled = InbIsSnapEnabled;
SaveConfig();
}
}
float USequencerSettings::GetTimeSnapInterval() const
{
return TimeSnapInterval;
}
void USequencerSettings::SetTimeSnapInterval(float InTimeSnapInterval)
{
if ( TimeSnapInterval != InTimeSnapInterval )
{
TimeSnapInterval = InTimeSnapInterval;
SaveConfig();
}
}
bool USequencerSettings::GetSnapKeyTimesToInterval() const
{
return bSnapKeyTimesToInterval;
}
void USequencerSettings::SetSnapKeyTimesToInterval(bool InbSnapKeyTimesToInterval)
{
if ( bSnapKeyTimesToInterval != InbSnapKeyTimesToInterval )
{
bSnapKeyTimesToInterval = InbSnapKeyTimesToInterval;
SaveConfig();
}
}
bool USequencerSettings::GetSnapKeyTimesToKeys() const
{
return bSnapKeyTimesToKeys;
}
void USequencerSettings::SetSnapKeyTimesToKeys(bool InbSnapKeyTimesToKeys)
{
if ( bSnapKeyTimesToKeys != InbSnapKeyTimesToKeys )
{
bSnapKeyTimesToKeys = InbSnapKeyTimesToKeys;
SaveConfig();
}
}
bool USequencerSettings::GetSnapSectionTimesToInterval() const
{
return bSnapSectionTimesToInterval;
}
void USequencerSettings::SetSnapSectionTimesToInterval(bool InbSnapSectionTimesToInterval)
{
if ( bSnapSectionTimesToInterval != InbSnapSectionTimesToInterval )
{
bSnapSectionTimesToInterval = InbSnapSectionTimesToInterval;
SaveConfig();
}
}
bool USequencerSettings::GetSnapSectionTimesToSections() const
{
return bSnapSectionTimesToSections;
}
void USequencerSettings::SetSnapSectionTimesToSections( bool InbSnapSectionTimesToSections )
{
if ( bSnapSectionTimesToSections != InbSnapSectionTimesToSections )
{
bSnapSectionTimesToSections = InbSnapSectionTimesToSections;
SaveConfig();
}
}
bool USequencerSettings::GetSnapPlayTimeToInterval() const
{
return bSnapPlayTimeToInterval;
}
void USequencerSettings::SetSnapPlayTimeToInterval(bool InbSnapPlayTimeToInterval)
{
if ( bSnapPlayTimeToInterval != InbSnapPlayTimeToInterval )
{
bSnapPlayTimeToInterval = InbSnapPlayTimeToInterval;
SaveConfig();
}
}
bool USequencerSettings::GetSnapPlayTimeToDraggedKey() const
{
return bSnapPlayTimeToDraggedKey;
}
void USequencerSettings::SetSnapPlayTimeToDraggedKey(bool InbSnapPlayTimeToDraggedKey)
{
if ( bSnapPlayTimeToDraggedKey != InbSnapPlayTimeToDraggedKey )
{
bSnapPlayTimeToDraggedKey = InbSnapPlayTimeToDraggedKey;
SaveConfig();
}
}
float USequencerSettings::GetCurveValueSnapInterval() const
{
return CurveValueSnapInterval;
}
void USequencerSettings::SetCurveValueSnapInterval( float InCurveValueSnapInterval )
{
if ( CurveValueSnapInterval != InCurveValueSnapInterval )
{
CurveValueSnapInterval = InCurveValueSnapInterval;
SaveConfig();
}
}
bool USequencerSettings::GetSnapCurveValueToInterval() const
{
return bSnapCurveValueToInterval;
}
void USequencerSettings::SetSnapCurveValueToInterval( bool InbSnapCurveValueToInterval )
{
if ( bSnapCurveValueToInterval != InbSnapCurveValueToInterval )
{
bSnapCurveValueToInterval = InbSnapCurveValueToInterval;
SaveConfig();
}
}
bool USequencerSettings::GetDetailsViewVisible() const
{
return bDetailsViewVisible;
}
void USequencerSettings::SetDetailsViewVisible(bool Visible)
{
if (bDetailsViewVisible != Visible)
{
bDetailsViewVisible = Visible;
SaveConfig();
}
}
bool USequencerSettings::GetLabelBrowserVisible() const
{
return bLabelBrowserVisible;
}
void USequencerSettings::SetLabelBrowserVisible(bool Visible)
{
if (bLabelBrowserVisible != Visible)
{
bLabelBrowserVisible = Visible;
SaveConfig();
}
}
bool USequencerSettings::GetAutoScrollEnabled() const
{
return bAutoScrollEnabled;
}
void USequencerSettings::SetAutoScrollEnabled(bool bInAutoScrollEnabled)
{
if (bAutoScrollEnabled != bInAutoScrollEnabled)
{
bAutoScrollEnabled = bInAutoScrollEnabled;
SaveConfig();
}
}
bool USequencerSettings::GetShowCurveEditor() const
{
return bShowCurveEditor;
}
void USequencerSettings::SetShowCurveEditor(bool InbShowCurveEditor)
{
if (bShowCurveEditor != InbShowCurveEditor)
{
bShowCurveEditor = InbShowCurveEditor;
OnShowCurveEditorChanged.Broadcast();
SaveConfig();
}
}
bool USequencerSettings::IsLooping() const
{
return bLooping;
}
void USequencerSettings::SetLooping(bool bInLooping)
{
if (bLooping != bInLooping)
{
bLooping = bInLooping;
SaveConfig();
}
}
bool USequencerSettings::ShouldKeepCursorInPlayRange() const
{
return bKeepCursorInPlayRange;
}
void USequencerSettings::SetKeepCursorInPlayRange(bool bInKeepCursorInPlayRange)
{
if (bKeepCursorInPlayRange != bInKeepCursorInPlayRange)
{
bKeepCursorInPlayRange = bInKeepCursorInPlayRange;
SaveConfig();
}
}
bool USequencerSettings::GetShowCurveEditorCurveToolTips() const
{
return bShowCurveEditorCurveToolTips;
}
void USequencerSettings::SetShowCurveEditorCurveToolTips(bool InbShowCurveEditorCurveToolTips)
{
if (bShowCurveEditorCurveToolTips != InbShowCurveEditorCurveToolTips)
{
bShowCurveEditorCurveToolTips = InbShowCurveEditorCurveToolTips;
SaveConfig();
}
}
float USequencerSettings::SnapTimeToInterval( float InTimeValue ) const
{
return TimeSnapInterval > 0
? FMath::RoundToInt( InTimeValue / TimeSnapInterval ) * TimeSnapInterval
: InTimeValue;
}
USequencerSettings::FOnShowCurveEditorChanged& USequencerSettings::GetOnShowCurveEditorChanged()
{
return OnShowCurveEditorChanged;
}
/** Level editor specific sequencer settings */
ULevelEditorSequencerSettings::ULevelEditorSequencerSettings( const FObjectInitializer& ObjectInitializer )
: Super( ObjectInitializer )
{
bKeyInterpPropertiesOnly = true;
TimeSnapInterval = 0.033334f;
bShowRangeSlider = true;
}