Navigation
API > API/Plugins > API/Plugins/MetaHumanToolkit
The base class for viewport clients used in the MetaHuman asset editor viewports that need to support the AB split functionality and user manipulation of tracker contour data.
The viewport client is the point of contact between the toolkit and anything related to manipulating the viewport. As a general guideline on using this class, any interaction with viewport by external classes should be handled by the viewport client. If the viewport client needs any information from external classes it should request it through a delegate.
This class is meant to work on its own but it relies on delegates to get which components should be hidden for views A and B, see GetHiddenComponentsForView. There is also functionality to manipulate components with UE's standard transform gizmo and delegates called when the camera moves and stops. The viewport client also controls the active navigation mode by means of locking and unlocking the navigation
| Name | FMetaHumanEditorViewportClient |
| Type | class |
| Header File | /Engine/Plugins/MetaHuman/MetaHumanAnimator/Source/MetaHumanToolkit/Public/MetaHumanEditorViewportClient.h |
| Include Path | #include "MetaHumanEditorViewportClient.h" |
Syntax
class FMetaHumanEditorViewportClient :
public FEditorViewportClient ,
public TSharedFromThis< FMetaHumanEditorViewportClient >
Inheritance Hierarchy
- FViewportClient → FCommonViewportClient → FEditorViewportClient → FMetaHumanEditorViewportClient
- FViewElementDrawer → FEditorViewportClient → FMetaHumanEditorViewportClient
- FGCObject → FEditorViewportClient → FMetaHumanEditorViewportClient
- FSharedFromThisBase → TSharedFromThis → FMetaHumanEditorViewportClient
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMetaHumanEditorViewportClient
(
FPreviewScene* InPreviewScene, |
MetaHumanEditorViewportClient.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMetaHumanEditorViewportClient() |
MetaHumanEditorViewportClient.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnGetAllPrimitiveComponents | TBaseDelegate_NoParams< TArray< class UPrimitiveComponent * > > | A delegate used to query all primitive components that are in the preview scene | MetaHumanEditorViewportClient.h |
| FOnGetPrimitiveComponentInstance | TBaseDelegate_OneParam< class UPrimitiveComponent *, class UPrimitiveComponent *InPrimitiveComponent > | A delegate used get the primitive component instance of a given primitive component. | MetaHumanEditorViewportClient.h |
| FOnGetSelectedPoseType | TBaseDelegate_NoParams< EIdentityPoseType > | A delegate used to query which pose is currently selected in the tree view | MetaHumanEditorViewportClient.h |
| FOnGetSelectedPrimitiveComponents | TBaseDelegate_NoParams< TArray< class UPrimitiveComponent * > > | A delegate used to query which components are selected so they can be highlighted in the viewport | MetaHumanEditorViewportClient.h |
| FOnPrimitiveComponentClicked | TBaseDelegate_OneParam< void, const class UPrimitiveComponent * > | Delegated called when a click is detected in a component | MetaHumanEditorViewportClient.h |
| FOnShouldUnlockNavigation | TBaseDelegate_NoParams< bool > | A delegate called to query if the navigation should really be unlocked if there is no visible footage component in the current view mode. | MetaHumanEditorViewportClient.h |
| FOnUpdateDepthData | TBaseDelegate_TwoParams< void, float, float > | Triggered when footage depth data is changed. | MetaHumanEditorViewportClient.h |
| FOnUpdateDepthMapVisibility | TBaseDelegate_OneParam< void, bool > | Triggered when the visibility of the depth map is changed | MetaHumanEditorViewportClient.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnCameraMovedDelegate | FSimpleMulticastDelegate | Called every time the camera moves | MetaHumanEditorViewportClient.h | |
| OnCameraStoppedDelegate | FSimpleMulticastDelegate | Called when the camera stops moving | MetaHumanEditorViewportClient.h | |
| OnGetAllPrimitiveComponentsDelegate | FOnGetAllPrimitiveComponents | MetaHumanEditorViewportClient.h | ||
| OnGetPrimitiveComponentInstanceDelegate | FOnGetPrimitiveComponentInstance | MetaHumanEditorViewportClient.h | ||
| OnGetSelectedPoseTypeDelegate | FOnGetSelectedPoseType | MetaHumanEditorViewportClient.h | ||
| OnGetSelectedPrimitivesComponentsDelegate | FOnGetSelectedPrimitiveComponents | MetaHumanEditorViewportClient.h | ||
| OnPrimitiveComponentClickedDelegate | FOnPrimitiveComponentClicked | MetaHumanEditorViewportClient.h | ||
| OnShouldUnlockNavigationDelegate | FOnShouldUnlockNavigation | MetaHumanEditorViewportClient.h | ||
| OnUpdateDepthMapVisibilityDelegate | FOnUpdateDepthMapVisibility | MetaHumanEditorViewportClient.h | ||
| OnUpdateFootageDepthDataDelegate | FOnUpdateDepthData | MetaHumanEditorViewportClient.h | ||
| OnUpdateMeshDepthDataDelegate | FOnUpdateDepthData | Triggered when mesh depth data is changed. | MetaHumanEditorViewportClient.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsManipulating | uint8 | True if we are manipulating a component through a gizmo. | MetaHumanEditorViewportClient.h | |
| InitialPivotLocation | FVector | The initial pivot location when the user starts interacting with gizmos in the viewport | MetaHumanEditorViewportClient.h | |
| ScopedTransaction | TUniquePtr< class FScopedTransaction > | The transaction used to record modifications done using the gizmos in the viewport. | MetaHumanEditorViewportClient.h | |
| WidgetMode | UE::Widget::EWidgetMode | The current gizmo widget mode | MetaHumanEditorViewportClient.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanChangeEV100
(
EABImageViewMode InViewMode |
Return true if the EV100 value can be changed | MetaHumanEditorViewportClient.h | |
virtual bool CanChangeViewMode
(
EABImageViewMode InViewMode |
Returns true if the view mode can be changed | MetaHumanEditorViewportClient.h | |
bool CanExecuteAction
(
EABImageViewMode InViewMode |
A default CanExecuteAction function used when mapping actions in with the FABCommandList | MetaHumanEditorViewportClient.h | |
virtual bool CanToggleShowControlVertices
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
virtual bool CanToggleShowCurves
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
virtual void EndCameraMovement() |
MetaHumanEditorViewportClient.h | ||
virtual void FocusViewportOnSelection () |
Focus the viewport on the selected components. | MetaHumanEditorViewportClient.h | |
EABImageViewMode GetABViewMode() |
Returns the current active AB view mode | MetaHumanEditorViewportClient.h | |
virtual UMetaHumanFootageComponent * GetActiveFootageComponent
(
const TArray< UPrimitiveComponent* >& InAllComponents |
Returns which of InAllComponents is the active, but not necessarily visible, footage component | MetaHumanEditorViewportClient.h | |
float GetEV100
(
EABImageViewMode InViewMode |
Returns the EV100 value for view A or view B | MetaHumanEditorViewportClient.h | |
FMetaHumanViewportClientDepthData GetFootageDepthData() |
Returns footage depth data. | MetaHumanEditorViewportClient.h | |
virtual TArray< class UPrimitiveComponent * > GetHiddenComponentsForView
(
EABImageViewMode InViewMode |
Can be overridden to determine which components are visible for a given view mode | MetaHumanEditorViewportClient.h | |
FMetaHumanViewportClientDepthData GetMeshDepthData() |
Returns mesh depth data. | MetaHumanEditorViewportClient.h | |
FVector2D GetPointPositionOnImage
(
const FVector2D& InScreenPosition |
Returns image coordinates for specified screen position | MetaHumanEditorViewportClient.h | |
const FPostProcessSettings & GetPostProcessSettingsForCurrentView() |
Returns the post process settings for the current view if single of View A if wipe or dual | MetaHumanEditorViewportClient.h | |
virtual bool GetSetViewpoint() |
Returns true if the view point is defined by the capture data (true for cases where you have footage, and thus a camera, but false for mesh capture data) | MetaHumanEditorViewportClient.h | |
EViewModeIndex GetViewModeIndexForABViewMode
(
EABImageViewMode InViewMode |
Returns the view mode index for view A or view B | MetaHumanEditorViewportClient.h | |
FVector2D GetWidgetSize() |
Returns the size of the STrackerImageViewer widget | MetaHumanEditorViewportClient.h | |
bool IsCameraMoving() |
Returns whether or not the camera is moving | MetaHumanEditorViewportClient.h | |
bool IsDepthMeshVisible
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
virtual bool IsFootageVisible
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
bool IsNavigationLocked() |
Returns whether or not the navigation is locked for the active AB view mode | MetaHumanEditorViewportClient.h | |
bool IsRigVisible
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
bool IsShowingControlVertices
(
EABImageViewMode InViewMode |
Returns the state of the Control Vertices toggle | MetaHumanEditorViewportClient.h | |
bool IsShowingCurves
(
EABImageViewMode InViewMode |
Returns the state of the Curves toggle | MetaHumanEditorViewportClient.h | |
bool IsShowingDualView() |
MetaHumanEditorViewportClient.h | ||
bool IsShowingSingleView() |
MetaHumanEditorViewportClient.h | ||
bool IsShowingUndistorted
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
bool IsShowingViewA() |
MetaHumanEditorViewportClient.h | ||
bool IsShowingViewB() |
MetaHumanEditorViewportClient.h | ||
bool IsShowingWipeView() |
MetaHumanEditorViewportClient.h | ||
bool IsViewModeIndexEnabled
(
EABImageViewMode InViewMode, |
Returns if the given EViewModeIndex is enable for a particular EABImageViewMode | MetaHumanEditorViewportClient.h | |
void NotifyViewportSettingsChanged() |
Trigger viewport settings changed delegate to broadcast | MetaHumanEditorViewportClient.h | |
void RefreshTrackerImageViewer() |
Updates the tracker image viewer by resetting its state | MetaHumanEditorViewportClient.h | |
void ResetABWipePostion() |
Calls a AB wipe reset on SABImage | MetaHumanEditorViewportClient.h | |
void SetABViewMode
(
EABImageViewMode InViewMode |
Sets the new active AB view mode | MetaHumanEditorViewportClient.h | |
void SetCurveDataController
(
const TSharedPtr< class FMetaHumanCurveDataController > InCurveDataController |
Sets the shape annotation with tracking data to be drawn in the viewport as an overlay | MetaHumanEditorViewportClient.h | |
void SetDepthMeshComponent
(
UMetaHumanDepthMeshComponent* InDepthMeshComponent |
Sets the depth mesh component used to display depth data as a 3D mesh | MetaHumanEditorViewportClient.h | |
void SetEditCurvesAndPointsEnabled
(
bool bInCanEdit |
Sets whether or not points and curves can be edited by means of user interaction | MetaHumanEditorViewportClient.h | |
void SetEditorViewportWidget
(
TSharedRef< class SMetaHumanEditorViewport > InEditorViewportWidget |
Sets the viewport widget we are going to control and creates the scene capture components to handle views A and B. | MetaHumanEditorViewportClient.h | |
void SetEV100
(
float InValue, |
Sets the exposure for view A or view B. | MetaHumanEditorViewportClient.h | |
void SetFootageDepthData
(
const FMetaHumanViewportClientDepthData& InDepthData |
Updates footage depth data. | MetaHumanEditorViewportClient.h | |
void SetMeshDepthData
(
const FMetaHumanViewportClientDepthData& InDepthData |
Updates mesh depth data. | MetaHumanEditorViewportClient.h | |
void SetNavigationLocked
(
bool bIsLocked |
Lock the navigation by changing it to 2D navigation mode | MetaHumanEditorViewportClient.h | |
void SetOverlay
(
const FText& InOverlay |
Set a text overlay in the STrackerImageViewer widget | MetaHumanEditorViewportClient.h | |
void SetTrackerImageSize
(
const FIntPoint& InTrackerImageSize |
Sets the size of the tracker image. This is used to place the contour data on screen | MetaHumanEditorViewportClient.h | |
void SetViewModeIndex
(
EABImageViewMode InViewMode, |
Sets the view mode index for view A or view B | MetaHumanEditorViewportClient.h | |
virtual bool ShouldShowControlVertices
(
EABImageViewMode InViewMode |
Returns whether the viewport allows the rendering of the control points | MetaHumanEditorViewportClient.h | |
virtual bool ShouldShowCurves
(
EABImageViewMode InViewMode |
Returns whether the viewport allows the rendering of the curves | MetaHumanEditorViewportClient.h | |
void StoreCameraStateInViewportSettings() |
Store the camera state in the viewport settings so it can be serialized and restored later | MetaHumanEditorViewportClient.h | |
void ToggleABViews() |
MetaHumanEditorViewportClient.h | ||
void ToggleDepthMeshVisible
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
void ToggleDistortion
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
void ToggleFootageVisibility
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
void ToggleRigVisibility
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
void ToggleShowControlVertices
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
void ToggleShowCurves
(
EABImageViewMode InViewMode |
MetaHumanEditorViewportClient.h | ||
virtual void UpdateABVisibility
(
bool bInSetViewpoint |
Function that should be called anytime the visibility state of a component in the viewport changes. | MetaHumanEditorViewportClient.h | |
void UpdateSceneCaptureComponents
(
bool bInClearHiddenComponents |
Updates the scene capture components based on the active view mode with the option to clear the hidden components | MetaHumanEditorViewportClient.h |
Overridden from FEditorViewportClient
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector GetWidgetLocation() |
MetaHumanEditorViewportClient.h | ||
virtual UE::Widget::EWidgetMode GetWidgetMode() |
MetaHumanEditorViewportClient.h | ||
virtual bool InputWidgetDelta
(
FViewport* InViewport, |
MetaHumanEditorViewportClient.h | ||
virtual void PerspectiveCameraMoved() |
MetaHumanEditorViewportClient.h | ||
virtual void ProcessClick
(
FSceneView& InView, |
MetaHumanEditorViewportClient.h | ||
virtual void SetCameraSpeedSettings
(
const FEditorViewportCameraSpeedSettings& InCameraSpeedSettings |
MetaHumanEditorViewportClient.h | ||
virtual void SetWidgetMode
(
UE::Widget::EWidgetMode InWidgetMode |
MetaHumanEditorViewportClient.h | ||
virtual void Tick
(
float InDeltaSeconds |
MetaHumanEditorViewportClient.h | ||
virtual void TrackingStarted
(
const FInputEventState& InInputState, |
MetaHumanEditorViewportClient.h | ||
virtual void TrackingStopped() |
MetaHumanEditorViewportClient.h | ||
virtual void UpdateMouseDelta() |
MetaHumanEditorViewportClient.h |
Overridden from FGCObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& InCollector |
MetaHumanEditorViewportClient.h | ||
virtual FString GetReferencerName() |
MetaHumanEditorViewportClient.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FPostProcessSettings GetDefaultPostProcessSettings() |
Returns the default post process settings to be used with this viewport | MetaHumanEditorViewportClient.h |