You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Removed ISequencerInternals interface as it was not necessary and confusing. [CL 2082317 by Matt Kuhlenschmidt in Main branch]
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
class UMovieSceneSection;
|
|
class IKeyArea;
|
|
|
|
/**
|
|
* Represents a selected key in the sequencer
|
|
*/
|
|
struct FSelectedKey
|
|
{
|
|
/** Section that the key belongs to */
|
|
UMovieSceneSection* Section;
|
|
/** Key area providing the key */
|
|
TSharedPtr<IKeyArea> KeyArea;
|
|
/** Index of the key in the key area */
|
|
TOptional<FKeyHandle> KeyHandle;
|
|
|
|
FSelectedKey( UMovieSceneSection& InSection, TSharedPtr<IKeyArea> InKeyArea, FKeyHandle InKeyHandle )
|
|
: Section( &InSection )
|
|
, KeyArea( InKeyArea )
|
|
, KeyHandle(InKeyHandle)
|
|
{}
|
|
|
|
FSelectedKey()
|
|
: Section( NULL )
|
|
, KeyArea( NULL )
|
|
, KeyHandle()
|
|
{}
|
|
|
|
/** @return Whether or not this is a valid selected key */
|
|
bool IsValid() const { return Section != NULL && KeyArea.IsValid() && KeyHandle.IsSet(); }
|
|
|
|
friend uint32 GetTypeHash( const FSelectedKey& SelectedKey )
|
|
{
|
|
return GetTypeHash( SelectedKey.Section ) ^ GetTypeHash( SelectedKey.KeyArea ) ^
|
|
(SelectedKey.KeyHandle.IsSet() ? GetTypeHash(SelectedKey.KeyHandle.GetValue()) : 0);
|
|
}
|
|
|
|
bool operator==( const FSelectedKey& OtherKey ) const
|
|
{
|
|
return Section == OtherKey.Section && KeyArea == OtherKey.KeyArea &&
|
|
KeyHandle.IsSet() && OtherKey.KeyHandle.IsSet() &&
|
|
KeyHandle.GetValue() == OtherKey.KeyHandle.GetValue();
|
|
}
|
|
|
|
};
|
|
|