Files
UnrealEngineUWP/Engine/Source/Editor/Persona/Public/PersonaToolMenuContext.h
eric knapik ebeb6781c1 Animation BP toolbar trimming & permissions
* Tab filters are now applied before tab widgets before are created for animation blueprint editor instead of only when a user tries opening a new tab. This prevents disallowed tabs in default layouts being created.
* Event graph documents are not opened if event graph permissions are disabled when loading blueprint editor.
* Added new blueprint permission to optionally disable function overrides.

#rb thomas.sarkanen
#preflight 6346928ef04e6f8505f7b879

[CL 22547860 by eric knapik in ue5-main branch]
2022-10-15 02:13:23 -04:00

59 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Templates/SharedPointer.h"
#include "UObject/Object.h"
#include "UObject/ObjectMacros.h"
#include "UObject/UObjectGlobals.h"
#include "PersonaModule.h"
#include "PersonaToolMenuContext.generated.h"
class IPersonaToolkit;
class UAnimBlueprint;
class UAnimationAsset;
class UDebugSkelMeshComponent;
class USkeletalMesh;
class USkeleton;
struct FFrame;
UCLASS(BlueprintType)
class PERSONA_API UPersonaToolMenuContext : public UObject
{
GENERATED_BODY()
public:
/** Get the skeleton that we are editing */
UFUNCTION(BlueprintCallable, Category = PersonaEditorExtensions)
USkeleton* GetSkeleton() const;
/** Get the preview component that we are using */
UFUNCTION(BlueprintCallable, Category = PersonaEditorExtensions)
UDebugSkelMeshComponent* GetPreviewMeshComponent() const;
/** Get the skeletal mesh that we are editing */
UFUNCTION(BlueprintCallable, Category = PersonaEditorExtensions)
USkeletalMesh* GetMesh() const;
/** Get the anim blueprint that we are editing */
UFUNCTION(BlueprintCallable, Category = PersonaEditorExtensions)
UAnimBlueprint* GetAnimBlueprint() const;
/** Get the animation asset that we are editing */
UFUNCTION(BlueprintCallable, Category = PersonaEditorExtensions)
UAnimationAsset* GetAnimationAsset() const;
/** Get the persona toolkit */
void SetToolkit(TSharedRef<IPersonaToolkit> InToolkit);
/** Get a weak ptr to the persona toolkit */
TWeakPtr<IPersonaToolkit> GetToolkit() const { return WeakToolkit; }
protected:
bool HasValidToolkit() const;
private:
TWeakPtr<IPersonaToolkit> WeakToolkit;
};