Navigation
API > API/Editor > API/Editor/Persona
| Name | FAnimationViewportClient |
| Type | class |
| Header File | /Engine/Source/Editor/Persona/Public/AnimationEditorViewportClient.h |
| Include Path | #include "AnimationEditorViewportClient.h" |
Syntax
class FAnimationViewportClient :
public FEditorViewportClient,
public TSharedFromThis< FAnimationViewportClient >
Inheritance Hierarchy
- FViewportClient → FCommonViewportClient → FEditorViewportClient → FAnimationViewportClient
- FViewportClient → FCommonViewportClient → FEditorViewportClient → FAnimationViewportClient
- FViewElementDrawer → FEditorViewportClient → FAnimationViewportClient
- FGCObject → FEditorViewportClient → FAnimationViewportClient
- FSharedFromThisBase → TSharedFromThis → FAnimationViewportClient
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnimationViewportClient
(
const TSharedRef< class IPersonaPreviewScene >& InPreviewScene, |
AnimationEditorViewportClient.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FAnimationViewportClient() |
AnimationEditorViewportClient.h |
Structs
| Name | Remarks |
|---|---|
| FTimecodeDisplayInfo |
Enums
Public
| Name | Remarks |
|---|---|
| EDirection |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ConfigOption | UPersonaOptions * | Persona config options | AnimationEditorViewportClient.h | |
| OnGetBoneSize | FOnGetBoneSize | AnimationEditorViewportClient.h | ||
| OnSetBoneSize | FOnBoneSizeSet | Allow client code to store/serialize bone size if desired | AnimationEditorViewportClient.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AssetEditorToolkitPtr | TWeakPtr< class FAssetEditorToolkit > | Weak pointer back to asset editor we are embedded in | AnimationEditorViewportClient.h | |
| bAutoAlignFloor | bool | Should we auto align floor to mesh bounds | AnimationEditorViewportClient.h | |
| bDoesAdditiveRefPoseHaveZeroScale | bool | Handle additive anim scale validation | AnimationEditorViewportClient.h | |
| bDrawUVs | bool | Flag for displaying the UV data in the viewport | AnimationEditorViewportClient.h | |
| bFocusOnDraw | bool | Focus on the preview component the next time we draw the viewport | AnimationEditorViewportClient.h | |
| bFocusUsingCustomCamera | bool | AnimationEditorViewportClient.h | ||
| bInitiallyFocused | bool | Whether we have initially focused on the preview mesh | AnimationEditorViewportClient.h | |
| BoneAsCameraForward | EAxis::Type | The forward axis to use when in EAnimationViewportCameraFollowMode::BoneAsCamera | AnimationEditorViewportClient.h | |
| BoneAsCameraPositionOffset | UE::Math::TVector< double > | The position offset from the bone origin in world space to use when in EAnimationViewportCameraFollowMode::BoneAsCamera | AnimationEditorViewportClient.h | |
| BoneAsCameraRight | EAxis::Type | The right axis to use when in EAnimationViewportCameraFollowMode::BoneAsCamera | AnimationEditorViewportClient.h | |
| BoneAsCameraRotationOffset | FRotator | The rotation offset from the bone origin in world space to use when in EAnimationViewportCameraFollowMode::BoneAsCamera | AnimationEditorViewportClient.h | |
| BoneAsCameraUp | EAxis::Type | The up axis to use when in EAnimationViewportCameraFollowMode::BoneAsCamera | AnimationEditorViewportClient.h | |
| BoneDrawSize | float | Size to draw bones in the viewport. Transient setting. | AnimationEditorViewportClient.h | |
| BonesToDraw | TBitArray | Bit field indexed on bone index that stores what bones are visible in the viewport, updated with UpdateBonesToDraw | AnimationEditorViewportClient.h | |
| bResumeAfterTracking | bool | True when the preview animation should resume playing upon finishing tracking | AnimationEditorViewportClient.h | |
| bRotateCameraToFollowBone | bool | Whether to lock the camera's rotation to a specified bone's orientation | AnimationEditorViewportClient.h | |
| bShowMeshStats | bool | Allow mesh stats to be disabled for specific viewport instances | AnimationEditorViewportClient.h | |
| CachedDefaultCameraController | FEditorCameraController * | We allow for replacing this in the underlying client so we cache it here. | AnimationEditorViewportClient.h | |
| CachedScreenSize | float | Screen size cached when we draw | AnimationEditorViewportClient.h | |
| CameraFollowBoneName | FName | The bone we will follow when in EAnimationViewportCameraFollowMode::Bone | AnimationEditorViewportClient.h | |
| CameraFollowMode | EAnimationViewportCameraFollowMode | The current camera follow mode | AnimationEditorViewportClient.h | |
| LastLookAtLocation | FVector | The last location the camera was told to look at | AnimationEditorViewportClient.h | |
| OnMeshChangedDelegateHandle | FDelegateHandle | Member use to unregister OnMeshChanged for our preview skeletal mesh | AnimationEditorViewportClient.h | |
| OnPhysicsCreatedDelegateHandle | FDelegateHandle | Member use to unregister OnPhysicsCreatedDelegate | AnimationEditorViewportClient.h | |
| OnSelectedBonesChangedHandle | FDelegateHandle | AnimationEditorViewportClient.h | ||
| OrbitRotation | FQuat | When orbiting, the base rotation of the camera, allowing orbiting around different axes to Z | AnimationEditorViewportClient.h | |
| PreviewScenePtr | TSharedPtr< class IPersonaPreviewScene > | Shared pointer back to the preview scene we are viewing Workaround fix for FORT-495476, UE-159733, UE-160424, UE-145060 We hold a shared because if the PreviewScene gets destroyed before we reach this class destructor, we can not unregister the callbacks from this class and we get crashes when any of the callbacks is triggered afterwards | AnimationEditorViewportClient.h | |
| RefPoseGuid | FGuid | AnimationEditorViewportClient.h | ||
| SelectedHSVColor | FLinearColor | User selected color using color picker | AnimationEditorViewportClient.h | |
| TimecodeDisplay | TOptional< FTimecodeDisplayInfo > | Timecode/slate information from current animation sequence. | AnimationEditorViewportClient.h | |
| UVChannelToDraw | int32 | Which UV channel to draw | AnimationEditorViewportClient.h | |
| ViewportIndex | int32 | Index (0-3) of this viewport | AnimationEditorViewportClient.h | |
| WidgetMode | UE::Widget::EWidgetMode | Current widget mode. | AnimationEditorViewportClient.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool CanSaveCameraAsDefault() |
Check whether we can save this camera as default | AnimationEditorViewportClient.h | |
void ClearDefaultCamera() |
Clear any default camera for mesh | AnimationEditorViewportClient.h | |
void DrawUVsForMesh
(
FViewport* InViewport, |
Draw call to render UV overlay | AnimationEditorViewportClient.h | |
void FocusViewportOnPreviewMesh
(
bool bUseCustomCamera |
Places the viewport camera at a good location to view the preview target | AnimationEditorViewportClient.h | |
void FocusViewportOnSphere
(
FSphere& Sphere, |
Places the viewport camera at a good location to view the supplied sphere | AnimationEditorViewportClient.h | |
TSharedRef< class FAssetEditorToolkit > GetAssetEditorToolkit() |
Get the asset editor we are embedded in | AnimationEditorViewportClient.h | |
EAxis::Type GetBoneAsCameraAxis
(
EDirection Direction |
Gets the axis for a direction when using the Bone As Camera follow mode | AnimationEditorViewportClient.h | |
UE::Math::TVector< double > GetBoneAsCameraPositionOffset() |
Gets the position offset from the bone origin in world coordiantes for the Bone As Camera follow mode | AnimationEditorViewportClient.h | |
FRotator GetBoneAsCameraRotationOffset() |
Gets the rotation offset from the bone in world coordiantes for the Bone As Camera follow mode | AnimationEditorViewportClient.h | |
EBoneDrawMode::Type GetBoneDrawMode() |
Get the Bone local axis mode | AnimationEditorViewportClient.h | |
float GetBoneDrawSize() |
AnimationEditorViewportClient.h | ||
float GetBrightnessValue() |
Function to get current brightness value | AnimationEditorViewportClient.h | |
FName GetCameraFollowBoneName() |
Get the bone name to use when CameraFollowMode is EAnimationViewportCameraFollowMode::Bone | AnimationEditorViewportClient.h | |
EAnimationViewportCameraFollowMode GetCameraFollowMode() |
Get the camera follow mode | AnimationEditorViewportClient.h | |
FSphere GetCameraTarget() |
Returns the desired target of the camera | AnimationEditorViewportClient.h | |
FText GetDisplayInfo
(
bool bDisplayAllInfo |
Function to display warning and info text on the viewport when outside of animBP mode | AnimationEditorViewportClient.h | |
float GetFloorOffset() |
Returns the floor height offset | AnimationEditorViewportClient.h | |
ELocalAxesMode::Type GetLocalAxesMode() |
Get the Bone local axis mode | AnimationEditorViewportClient.h | |
TSharedRef< class IPersonaPreviewScene > GetPreviewScene() |
Get the preview scene we are viewing | AnimationEditorViewportClient.h | |
bool GetShouldRotateCameraToFollowBone() |
Whether or not to lock the camera's rotation to a specified bone's orientation | AnimationEditorViewportClient.h | |
int32 GetShowMeshStats() |
AnimationEditorViewportClient.h | ||
int32 GetUVChannelToDraw() |
Returns the UV Channel that will be drawn when Draw UV Overlay is turned on | AnimationEditorViewportClient.h | |
int32 GetViewportIndex() |
Get the viewport index (0-3) for this client | AnimationEditorViewportClient.h | |
void HandleOnMeshChanged() |
Handle a change in the skeletal mesh mesh component being used for preview changing | AnimationEditorViewportClient.h | |
void HandleOnSkelMeshPhysicsCreated() |
Handle a change in the skeletal mesh phusics component being used for preview changing | AnimationEditorViewportClient.h | |
void HandleSkeletalMeshChanged
(
USkeletalMesh* OldSkeletalMesh, |
Handle the skeletal mesh mesh component being used for preview changing | AnimationEditorViewportClient.h | |
bool HasDefaultCameraSet() |
Returns whether we have a default camera set for this mesh | AnimationEditorViewportClient.h | |
void Initialize() |
AnimationEditorViewportClient.h | ||
bool IsAudioMuted() |
Function to check whether audio is muted or not | AnimationEditorViewportClient.h | |
bool IsAutoAlignFloor() |
Function to check whether floor is auto align or not | AnimationEditorViewportClient.h | |
bool IsBoneDrawModeSet
(
EBoneDrawMode::Type AxesMode |
Bone Draw mode checking function for the EBoneDrawType | AnimationEditorViewportClient.h | |
bool IsDetailedMeshStats() |
Whether detailed mesh stats are being displayed or basic mesh stats | AnimationEditorViewportClient.h | |
bool IsLocalAxesModeSet
(
ELocalAxesMode::Type AxesMode |
Local axes mode checking function for the ELocalAxesType | AnimationEditorViewportClient.h | |
bool IsSetCPUSkinningChecked() |
Callback for checking the normals show flag. | AnimationEditorViewportClient.h | |
bool IsSetDrawUVOverlayChecked() |
Callback for checking whether the UV drawing is switched on. | AnimationEditorViewportClient.h | |
bool IsSetShowBinormalsChecked() |
Callback for checking the binormals show flag. | AnimationEditorViewportClient.h | |
bool IsSetShowNormalsChecked() |
Callback for checking the normals show flag. | AnimationEditorViewportClient.h | |
bool IsSetShowTangentsChecked() |
Callback for checking the tangents show flag. | AnimationEditorViewportClient.h | |
bool IsShowingMeshStats() |
Whether or not mesh stats are being displayed | AnimationEditorViewportClient.h | |
bool IsShowingSelectedNodeStats() |
Whether or not selected node stats are being displayed | AnimationEditorViewportClient.h | |
bool IsUsingAudioAttenuation() |
Check whether we are using audio attenuation | AnimationEditorViewportClient.h | |
void JumpToDefaultCamera() |
Jump to the meshes default camera | AnimationEditorViewportClient.h | |
void OnFocusViewportToSelection() |
Called when viewport focuses on a selection | AnimationEditorViewportClient.h | |
void OnSetShowMeshStats
(
int32 ShowMode |
Function to set mesh stat drawing state | AnimationEditorViewportClient.h | |
void OnToggleAutoAlignFloor() |
Function to enable/disable floor auto align | AnimationEditorViewportClient.h | |
void OnToggleMuteAudio() |
Function to mute/unmute audio in the viewport | AnimationEditorViewportClient.h | |
void OnToggleUseAudioAttenuation() |
Set whether to use audio attenuation | AnimationEditorViewportClient.h | |
void SaveCameraAsDefault() |
Save current camera as default for mesh | AnimationEditorViewportClient.h | |
void SetBackgroundColor
(
FLinearColor InColor |
Function to set background color | AnimationEditorViewportClient.h | |
void SetBoneAsCameraAxis
(
EDirection Direction, |
Sets the axis for a direction when using the Bone As Camera follow mode | AnimationEditorViewportClient.h | |
void SetBoneAsCameraPositionOffset
(
UE::Math::TVector< double > Offset |
Sets the position offset from the bone origin in world coordiantes for the Bone As Camera follow mode | AnimationEditorViewportClient.h | |
void SetBoneAsCameraRotationOffset
(
const FRotator& Offset |
Sets the rotation offset from the bone in world coordiantes for the Bone As Camera follow mode | AnimationEditorViewportClient.h | |
void SetBoneDrawMode
(
EBoneDrawMode::Type AxesMode |
Function to set Bone Draw mode for the EBoneDrawType | AnimationEditorViewportClient.h | |
void SetBoneDrawSize
(
const float InBoneDrawSize |
Access Bone Draw size config option | AnimationEditorViewportClient.h | |
void SetBrightnessValue
(
float Value |
Function to set brightness value | AnimationEditorViewportClient.h | |
void SetCameraFollowMode
(
EAnimationViewportCameraFollowMode Mode, |
Set the camera follow mode | AnimationEditorViewportClient.h | |
void SetDrawUVOverlay
(
bool bInDrawUVs |
Callback for toggling UV drawing in the viewport | AnimationEditorViewportClient.h | |
void SetFloorOffset
(
float NewValue |
Sets the floor height offset, saves it to config and invalidates the viewport so it shows up immediately | AnimationEditorViewportClient.h | |
void SetLocalAxesMode
(
ELocalAxesMode::Type AxesMode |
Function to set Local axes mode for the ELocalAxesType | AnimationEditorViewportClient.h | |
void SetUVChannelToDraw
(
int32 UVChannel |
Sets the UV Channel that will be drawn when Draw UV Overlay is turned on | AnimationEditorViewportClient.h | |
bool ShouldDisplayAdditiveScaleErrorMessage() |
Handle error checking for additive base pose | AnimationEditorViewportClient.h | |
void ShowBoneNames
(
FViewport* Viewport, |
Function to display bone names | AnimationEditorViewportClient.h | |
void ToggleCPUSkinning() |
Callback for toggling the normals show flag. | AnimationEditorViewportClient.h | |
void ToggleRotateCameraToFollowBone() |
Toggles whether to lock the camera's rotation to a specified bone's orientation | AnimationEditorViewportClient.h | |
void ToggleShowBinormals() |
Callback for toggling the binormals show flag. | AnimationEditorViewportClient.h | |
void ToggleShowNormals() |
Callback for toggling the normals show flag. | AnimationEditorViewportClient.h | |
void ToggleShowTangents() |
Callback for toggling the tangents show flag. | AnimationEditorViewportClient.h | |
void UpdateCameraSetup() |
Sets up the viewports camera (look-at etc) based on the current preview target | AnimationEditorViewportClient.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FMatrix CalcViewRotationMatrix
(
const FRotator& InViewRotation |
AnimationEditorViewportClient.h | ||
virtual bool CanCycleWidgetMode() |
AnimationEditorViewportClient.h | ||
virtual void Draw
(
const FSceneView* View, |
AnimationEditorViewportClient.h | ||
virtual void DrawCanvas
(
FViewport& InViewport, |
AnimationEditorViewportClient.h | ||
virtual FMatrix GetWidgetCoordSystem() |
AnimationEditorViewportClient.h | ||
virtual ECoordSystem GetWidgetCoordSystemSpace() |
AnimationEditorViewportClient.h | ||
virtual FVector GetWidgetLocation() |
Virtual UE::Widget::EWidgetMode GetWidgetMode() const override; virtual void SetWidgetMode(UE::Widget::EWidgetMode InWidgetMode) override; virtual bool CanSetWidgetMode(UE::Widget::EWidgetMode NewMode) const override; | AnimationEditorViewportClient.h | |
virtual void HandleToggleShowFlag
(
FEngineShowFlags::EShowFlag EngineShowFlagIndex |
AnimationEditorViewportClient.h | ||
virtual bool InputAxis
(
const FInputKeyEventArgs& EventArgs |
AnimationEditorViewportClient.h | ||
virtual bool InputKey
(
const FInputKeyEventArgs& EventArgs |
AnimationEditorViewportClient.h | ||
virtual void LostFocus
(
FViewport* InViewport |
AnimationEditorViewportClient.h | ||
virtual void ReceivedFocus
(
FViewport* InViewport |
AnimationEditorViewportClient.h | ||
virtual void RotateViewportType() |
AnimationEditorViewportClient.h | ||
virtual void SetCameraSpeedSettings
(
const FEditorViewportCameraSpeedSettings& InCameraSpeedSettings |
AnimationEditorViewportClient.h | ||
virtual void SetupViewForRendering
(
FSceneViewFamily& ViewFamily, |
AnimationEditorViewportClient.h | ||
virtual void SetViewMode
(
EViewModeIndex InViewModeIndex |
AnimationEditorViewportClient.h | ||
virtual void SetViewportType
(
ELevelViewportType InViewportType |
AnimationEditorViewportClient.h | ||
virtual void SetWidgetCoordSystemSpace
(
ECoordSystem NewCoordSystem |
AnimationEditorViewportClient.h | ||
virtual void Tick
(
float DeltaSeconds |
AnimationEditorViewportClient.h | ||
virtual void TrackingStarted
(
const FInputEventState& InInputState, |
Virtual void ProcessClick(class FSceneView& View, class HHitProxy* HitProxy, FKey Key, EInputEvent Event, uint32 HitX, uint32 HitY) override; virtual bool InputWidgetDelta( FViewport* Viewport, EAxisList::Type CurrentAxis, FVector& Drag, FRotator& Rot, FVector& Scale ) override; | AnimationEditorViewportClient.h | |
virtual void TrackingStopped() |
AnimationEditorViewportClient.h | ||
virtual void UpdateBonesToDraw() |
Sets what bones are drawn by DrawMeshBones and ShowBoneNames. | AnimationEditorViewportClient.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Function to display debug lines generated from skeletal controls in animBP mode | AnimationEditorViewportClient.h | ||
void ShowAttributeNames
(
FCanvas* Canvas, |
Function to display transform attribute names | AnimationEditorViewportClient.h | |
void ShowBoneNames
(
FCanvas* Canvas, |
Function to display bone names | AnimationEditorViewportClient.h |
Protected Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PerspectiveCameraMoved() |
AnimationEditorViewportClient.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void DrawSockets
(
const UDebugSkelMeshComponent* InPreviewMeshComponent, |
Draws Mesh Sockets in foreground - bUseSkeletonSocketColor = true for grey (skeleton), false for red (mesh) | AnimationEditorViewportClient.h | |
static void RenderGizmo
(
const FTransform& Transform, |
Draws Gizmo for the Transform in foreground | AnimationEditorViewportClient.h |