Files
UnrealEngineUWP/Engine/Source/Editor/Persona/Private/SAnimCompositeEditor.h
Jurre deBaare 7db755f123 Removed OnStopEditingCurves delegate and behaviour from Persona module, this is now superseded with AnimDataModel notify callbacks instead
#misc fixed use after release crash
#jira none
#rb Thomas.Sarkanen
#preflight 627b8dc9b60dee4a43a33c0f

[CL 20136161 by Jurre deBaare in ue5-main branch]
2022-05-11 07:05:49 -04:00

67 lines
2.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Widgets/SWidget.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "SAnimEditorBase.h"
#include "Animation/AnimComposite.h"
#include "SAnimCompositePanel.h"
class SAnimNotifyPanel;
class FAnimModel_AnimComposite;
//////////////////////////////////////////////////////////////////////////
// SAnimCompositeEditor
/** Overall animation composite editing widget. This mostly contains functions for editing the UAnimComposite.
SAnimCompositeEditor will create the SAnimCompositePanel which is mostly responsible for setting up the UI
portion of the composite tool and registering callbacks to the SAnimCompositeEditor to do the actual editing.
*/
class SAnimCompositeEditor : public SAnimEditorBase, public FEditorUndoClient
{
public:
SLATE_BEGIN_ARGS( SAnimCompositeEditor )
: _Composite(NULL)
{}
SLATE_ARGUMENT( UAnimComposite*, Composite)
SLATE_EVENT(FOnObjectsSelected, OnObjectsSelected)
SLATE_EVENT(FOnInvokeTab, OnInvokeTab)
SLATE_EVENT(FOnEditCurves, OnEditCurves)
SLATE_END_ARGS()
private:
TSharedPtr<FAnimModel_AnimComposite> AnimModel;
public:
~SAnimCompositeEditor();
void Construct(const FArguments& InArgs, const TSharedRef<class IPersonaPreviewScene>& InPreviewScene, const TSharedRef<class IEditableSkeleton>& InEditableSkeleton, const TSharedRef<FUICommandList>& InCommandList);
/** Return the animation composite being edited */
UAnimComposite* GetCompositeObj() const { return CompositeObj; }
virtual UAnimationAsset* GetEditorObject() const override { return GetCompositeObj(); }
private:
/** Pointer to the animation composite being edited */
UAnimComposite* CompositeObj;
public:
//~ Begin SAnimEditorBase Interface
virtual TSharedRef<SWidget> CreateDocumentAnchor() override;
//~ End SAnimEditorBase Interface
/** FEditorUndoClient interface */
virtual void PostUndo( bool bSuccess ) override;
virtual void PostRedo( bool bSuccess ) override;
/** Post undo **/
void PostUndoRedo();
};