You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb brooke.hubert Thomas.Sarkanen #jira UE-143249 #preflight 628549709e72602f6ab62b3b [CL 20282438 by zach rammell in ue5-main branch]
45 lines
1.4 KiB
C++
45 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "EdMode.h"
|
|
#include "AnimationEditContext.h"
|
|
|
|
#include "AnimationEditMode.generated.h"
|
|
|
|
class FAnimationEditMode;
|
|
|
|
/**
|
|
* A compatibility context object to support IPersonaEditMode-based code. It simply calls into a different
|
|
* IAnimationEditContext in its implementations.
|
|
*/
|
|
UCLASS(MinimalAPI)
|
|
class UAnimationEditModeContext : public UObject, public IAnimationEditContext
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
virtual bool GetCameraTarget(FSphere& OutTarget) const override;
|
|
virtual class IPersonaPreviewScene& GetAnimPreviewScene() const override;
|
|
virtual void GetOnScreenDebugInfo(TArray<FText>& OutDebugInfo) const override;
|
|
private:
|
|
IAnimationEditContext* EditMode = nullptr;
|
|
static UAnimationEditModeContext* CreateFor(IAnimationEditContext* InEditMode)
|
|
{
|
|
UAnimationEditModeContext* NewPersonaContext = NewObject<UAnimationEditModeContext>();
|
|
NewPersonaContext->EditMode = InEditMode;
|
|
return NewPersonaContext;
|
|
}
|
|
friend FAnimationEditMode;
|
|
};
|
|
|
|
class ANIMATIONEDITMODE_API FAnimationEditMode : public FEdMode, public IAnimationEditContext
|
|
{
|
|
public:
|
|
virtual void Enter() override;
|
|
virtual void Exit() override;
|
|
virtual void AddReferencedObjects(FReferenceCollector& Collector) override;
|
|
private:
|
|
TObjectPtr<UAnimationEditModeContext> AnimationEditModeContext{UAnimationEditModeContext::CreateFor(this)};
|
|
};
|