Files
UnrealEngineUWP/Engine/Source/Editor/UMGEditor/Private/Animation/UMGDetailKeyframeHandler.cpp
Frank Fella ca7f7888f5 Sequencer - Add features to allow for better in-timeline editing of animations.
+ Add a toolbar button for adding additional objects to animate.
+ Add combo buttons to object binding tracks for adding additional property tracks.
+ Make the animation outliner resizable.
+ Add widgets for editing key values to the animation outliner.
+ Add buttons for navigating to previous and next keys, and for adding a key at the current time to the animation outliner.

[CL 2583673 by Frank Fella in Main branch]
2015-06-10 21:28:02 -04:00

31 lines
1.1 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "UMGEditorPrivatePCH.h"
#include "UMGDetailKeyframeHandler.h"
#include "ISequencer.h"
#include "PropertyHandle.h"
#include "WidgetBlueprintEditor.h"
FUMGDetailKeyframeHandler::FUMGDetailKeyframeHandler(TSharedPtr<FWidgetBlueprintEditor> InBlueprintEditor)
: BlueprintEditor( InBlueprintEditor )
{}
bool FUMGDetailKeyframeHandler::IsPropertyKeyable(UClass* InObjectClass, const IPropertyHandle& InPropertyHandle) const
{
return BlueprintEditor.Pin()->GetSequencer()->CanKeyProperty(FCanKeyPropertyParams(InObjectClass, InPropertyHandle));
}
bool FUMGDetailKeyframeHandler::IsPropertyKeyingEnabled() const
{
UMovieScene* MovieScene = BlueprintEditor.Pin()->GetSequencer()->GetRootMovieScene();
return MovieScene != nullptr && MovieScene != UWidgetAnimation::GetNullAnimation()->MovieScene;
}
void FUMGDetailKeyframeHandler::OnKeyPropertyClicked(const IPropertyHandle& KeyedPropertyHandle)
{
TArray<UObject*> Objects;
KeyedPropertyHandle.GetOuterObjects( Objects );
BlueprintEditor.Pin()->GetSequencer()->KeyProperty(FKeyPropertyParams(Objects, KeyedPropertyHandle));
}