Navigation
API > API/Editor > API/Editor/UnrealEd
Inheritance Hierarchy
- FCommonViewportClient
- FViewElementDrawer
- FGCObject
- FEditorViewportClient
- FLevelEditorViewportClient
References
| Module | UnrealEd |
| Header | /Engine/Source/Editor/UnrealEd/Public/LevelEditorViewport.h |
| Include | #include "LevelEditorViewport.h" |
Syntax
class FLevelEditorViewportClient : public FEditorViewportClient
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bAlwaysShowModeWidgetAfterSelectionChanges | When enabled, the Unreal transform widget will become visible after an actor is selected, even if it was turned off via a show flag | |
| bool | bDrawBaseInfo | Indicates whether, of not, the base attachment volume should be drawn for this viewport. | |
| bool | bDuplicateActorsInProgress | BDuplicateActorsOnNextDrag will not be set again while bDuplicateActorsInProgress is true. | |
| bool | bDuplicateOnNextDrag | Used for drag duplication. | |
| bool | bEnableColorScaling | ||
| bool | bEnableFading | ||
| bool | bHasBegunGizmoManipulation | True if gizmo manipulation was started from a tracking event | |
| bool | bIsTrackingBrushModification | True when a brush is being transformed by its Widget | |
| bool | bLockedCameraView | True if this viewport is to change its view (aspect ratio, post processing, FOV etc) to match that of the currently locked camera, if applicable | |
| bool | bNeedToRestoreComponentBeingMovedFlag | True if the viewport needs to restore the flag when tracking ends | |
| bool | bOnlyMovedPivot | True if only the pivot position has been moved | |
| bool | bReceivedFocusRecently | Whether this viewport recently received focus. | |
| FVector | ColorScale | ||
| float | FadeAmount | ||
| FLinearColor | FadeColor | ||
| FVector | LastEditorViewLocation | The viewport location that is restored when exiting PIE | |
| FRotator | LastEditorViewRotation | The viewport orientation that is restored when exiting PIE | |
| TWeakPtr< class ILevelEditor > | ParentLevelEditor | Parent level editor that owns this viewport. | |
| TArray< FName > | ViewHiddenLayers | List of layers that are hidden in this view | |
| TBitArray | VolumeActorVisibility | Special volume actor visibility settings. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FLevelEditorViewportClient
(
const TSharedPtr< class SLevelViewport >& InLevelViewport |
Constructor |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddHoverEffect
(
const FViewportHoverTarget& InHoverTarget |
Static: Adds a hover effect to the specified object | |
| void | ApplyDeltaToActor
(
AActor* InActor, |
||
| void | ApplyDeltaToActors
(
const FVector& InDrag, |
||
| void | ApplyDeltaToComponent
(
USceneComponent* InComponent, |
||
| void | ApplyDeltaToElement
(
const FTypedElementHandle& InElementHandle, |
||
| void | ApplyDeltaToSelectedElements
(
const FTransform& InDeltaTransform |
||
| bool | CanApplyMaterialToHitProxy
(
const HHitProxy* HitProxy |
Called to check if a material can be applied to an object, given the hit proxy | |
| bool | CanDropBlueprintAsset
(
const FSelectedAssetInfo& |
Checks the viewport to see if the given blueprint asset can be dropped on the viewport. | |
| void | Static: Clears viewport hover effects from any objects that currently have that | ||
| void | CopyLayoutFromViewport
(
const FLevelEditorViewportClient& InViewport |
Copies layout and camera settings from the specified viewport | |
| void | DrawTextureStreamingBounds
(
const FSceneView* View, |
Draw the texture streaming bounds. | |
| UActorComponent * | FindViewComponentForActor
(
AActor const* Actor |
Find a view component to use for the specified actor. | |
| TWeakObjectPtr< AActor > | Access the 'active' actor lock. | ||
| const FLevelViewportActorLock & | GetActorLock () |
Gets the actor lock. This is the actor locked to the viewport via the viewport menus. | |
| FLevelViewportActorLock & | GetActorLock () |
Gets the actor lock. This is the actor locked to the viewport via the viewport menus. | |
| UCameraComponent * | Find the camera component that is driving this viewport, in the following order of preference: | ||
| const FLevelViewportActorLock & | Get the actor locked to the viewport by cinematic tools like Sequencer. | ||
| FLevelViewportActorLock & | Get the actor locked to the viewport by cinematic tools like Sequencer. | ||
| const TArray< TWeakObjectPtr< AActor > > & | |||
| FVector2D | |||
| FTypedElementListConstRef | GetElementsToManipulate
(
const bool bForceRefresh |
Get the elements (from the current selection set) that this viewport can manipulate (eg, via the transform gizmo). | |
| bool | GetFocusBounds
(
FTypedElementListConstRef InElements, |
||
| EAxisList::Type | GetHorizAxis () |
Returns the horizontal axis for this viewport. | |
| bool | |||
| UObject * | GetOrCreateMaterialFromTexture
(
UTexture* UnrealTexture |
Static: Given a texture, returns a material for that texture, creating a new asset if necessary. | |
| const FLevelViewportActorLock & | Gets the previous actor lock. This is the actor locked to the viewport via the viewport menus. | ||
| const FLevelViewportActorLock & | Get the previous actor locked to the viewport by cinematic tools like Sequencer. | ||
| bool | GetSpriteCategoryVisibility
(
const FName& InSpriteCategory |
Returns whether the provided unlocalized sprite category is visible in the viewport or not | |
| bool | GetSpriteCategoryVisibility
(
int32 Index |
Returns whether the sprite category specified by the provided index is visible in the viewport or not | |
| EAxisList::Type | GetVertAxis () |
Returns the vertical axis for this viewport. | |
| void | HandleViewportSettingChanged
(
FName PropertyName |
Callback for when an editor user setting has changed | |
| void | Initialize viewport interaction | ||
| void | Initialize visibility flags | ||
| bool | IsActorLocked
(
const TWeakObjectPtr< const AActor > InActor |
Check to see if this actor is locked by the viewport | |
| bool | Check to see if any actor is locked by the viewport | ||
| bool | Returns true if creating a preview actor in the viewport. | ||
| bool | IsLockedToActor
(
AActor* Actor |
Check whether this viewport is locked to the specified actor | |
| bool | Check whether this viewport is locked to display a cinematic camera, like a Sequencer camera. | ||
| bool | IsVolumeVisibleInViewport
(
const AActor& VolumeActor |
Returns true if the passed in volume is visible in the viewport (due to volume actor visibility flags) | |
| void | MirrorSelectedActors
(
const FVector& InMirrorScale |
||
| void | MirrorSelectedElements
(
const FVector& InMirrorScale |
||
| void | Moves the viewport camera according to the locked actors location and rotation | ||
| void | OnActorMoved
(
AActor* InActor |
Delegate handler for ActorMoved events | |
| void | Called when editor cleanse event is triggered | ||
| void | OnMapChanged
(
UWorld* InWorld, |
Callback for when a map is created or destroyed | |
| void | OnPreBeginPIE
(
const bool bIsSimulating |
Called before the editor tries to begin PIE | |
| void | Stores camera settings that may be adversely affected by PIE, so that they may be restored later | ||
| void | RemoveHoverEffect
(
const FViewportHoverTarget& InHoverTarget |
Static: Removes a hover effect to the specified object | |
| void | RemoveReferenceToWorldContext
(
FWorldContext& WorldContext |
||
| void | ResetCamera () |
Reset the camera position and rotation. Used when creating a new level. | |
| void | Reset the view for a new map | ||
| void | Restores camera settings that may be adversely affected by PIE | ||
| void | SetActorLock
(
const FLevelViewportActorLock& InActorLock |
Set the actor lock. This is the actor locked to the viewport via the viewport menus. | |
| void | SetActorLock
(
AActor* Actor |
Set the actor lock. This is the actor locked to the viewport via the viewport menus. | |
| void | SetAllSpriteCategoryVisibility
(
bool bVisible |
Sets the visibility of all sprite categories to the provided value | |
| void | SetCinematicActorLock
(
AActor* Actor |
Set the actor locked to the viewport by cinematic tools like Sequencer. | |
| void | SetCinematicActorLock
(
const FLevelViewportActorLock& InActorLock |
Set the actor locked to the viewport by cinematic tools like Sequencer. | |
| void | Set the global ptr to the current viewport | ||
| void | Informs the renderer that the view is being interactively edited. | ||
| void | Sets a flag for this frame indicating that the camera has been cut, and temporal effects (such as motion blur) should be reset | ||
| void | SetIsDroppingPreviewActor
(
bool bNewIsDroppingPreviewActor |
Sets the state of creating a preview actor in the viewport. | |
| void | Set the global ptr to the last viewport to receive a key press | ||
| void | SetReferenceToWorldContext
(
FWorldContext& WorldContext |
||
| void | SetSpriteCategoryVisibility
(
const FName& InSpriteCategory, |
Sets the visibility of the provided unlocalized category to the provided value | |
| void | SetSpriteCategoryVisibility
(
int32 Index, |
Sets the visibility of the category specified by the provided index to the provided value | |
| void | SetViewportTypeFromTool
(
ELevelViewportType InViewportType |
Calling SetViewportType from Dragtool_ViewportChange | |
| bool | Determines if the new MoveCanvas movement should be used | ||
| TArray< AActor * > | TryPlacingActorFromObject
(
ULevel* InLevel, |
Static: Attempts to place the specified object in the level, returning one or more newly-created actors if successful. | |
| void | UpdateAudioListener
(
const FSceneView& View |
Updates the audio listener for this viewport | |
| void | UpdateHoveredObjects
(
const TSet< FViewportHoverTarget >& NewHoveredObjects |
||
| void | UpdateViewForLockedActor
(
float DeltaTime |
Updates or resets view properties such as aspect ratio, FOV, location etc to match that of any actor we are locked to |
Overridden from FEditorViewportClient
| Type | Name | Description | |
|---|---|---|---|
| void | Aborts mouse tracking (stop and cancel) | ||
| void | BeginCameraMovement
(
bool bHasMovement |
Handle the camera about to be moved or stopped | |
| FSceneView * | CalcSceneView
(
FSceneViewFamily* ViewFamily, |
Configures the specified FSceneView object with the view and projection matrices for this viewport. | |
| FDropQuery | CanDropObjectsAtCoordinates
(
int32 MouseX, |
Checks the viewport to see if the given object can be dropped using the given mouse coordinates local to this viewport | |
| void | CheckHoveredHitProxy
(
HHitProxy* HoveredHitProxy |
Checks if the mouse is hovered over a hit proxy and decides what to do. | |
| void | If dragging an actor for placement, this function destroys the actor. | ||
| void | DrawCanvas
(
FViewport& InViewport, |
Called to draw onto the viewports 2D canvas | |
| bool | DropObjectsAtCoordinates
(
int32 MouseX, |
Attempts to intelligently drop the given objects in the viewport, using the given mouse coordinates local to this viewport | |
| void | |||
| bool | GetActiveSafeFrame
(
float& OutAspectRatio |
Helper used by DrawSafeFrames to get the current safe frame aspect ratio. | |
| FLinearColor | |||
| float | Get the camera speed scalar for this viewport | ||
| int32 | Get the camera speed setting for this viewport | ||
| bool | GetPivotForOrbit
(
FVector& OutPivot |
Get the custom pivot point around which the camera should orbit for this viewport | |
| ELevelViewportType | Returns the effective viewport type (taking into account any actor locking or camera possession) | ||
| FMatrix | |||
| FVector | |||
| UE::Widget::EWidgetMode | |||
| bool | Returns true if a placement dragging actor exists | ||
| bool | InputWidgetDelta
(
FViewport* InViewport, |
Called to give the viewport client a chance to handle widgets being moved | |
| bool | If true, this is a level editor viewport | ||
| TSharedPtr< FDragTool > | MakeDragTool
(
EDragTool::Type DragToolType |
Called to make a drag tool when the user starts dragging in the viewport | |
| void | NudgeSelectedObjects
(
const FInputEventState& InputState |
||
| void | OverridePostProcessSettings
(
FSceneView& View |
Called to override any post process settings for the view | |
| void | Called when the perspective viewport camera moves | ||
| void | ProcessClick
(
FSceneView& View, |
Called when the user clicks in the viewport | |
| void | Invalidates this and other linked viewports (anything viewing the same scene) | ||
| void | Rotate through viewport view options | ||
| void | SetCameraSpeedScalar
(
float SpeedScalar |
Set the camera speed scalar for this viewport | |
| void | SetCameraSpeedSetting
(
int32 SpeedSetting |
Set the speed setting for the camera in this viewport | |
| void | SetupViewForRendering
(
FSceneViewFamily& ViewFamily, |
Called to do any additional set up of the view for rendering | |
| void | SetViewportType
(
ELevelViewportType InViewportType |
Set the viewport type of the client | |
| void | SetVREditView
(
bool bGameViewEnable |
||
| bool | |||
| bool | |||
| void | Tick
(
float DeltaSeconds |
Ticks this viewport client | |
| void | TrackingStarted
(
const FInputEventState& InInputState, |
Called when mouse movement tracking begins | |
| void | Called when mouse movement tracking stops | ||
| bool | UpdateDropPreviewActors
(
int32 MouseX, |
If dragging an actor for placement, this function updates its position. | |
| void | UpdateLinkedOrthoViewports
(
bool bInvalidate |
FEditorViewportClient Interface | |
| bool | UseAppTime () |
Should this viewport use app time instead of world time. |
Overridden from FViewportClient
| Type | Name | Description | |
|---|---|---|---|
| void | CapturedMouseMove
(
FViewport* InViewport, |
Called when the mouse is moved while a window input capture is in effect | |
| void | ConditionalRestoreWorld
(
UWorld* InWorld |
Restores GWorld to InWorld | |
| UWorld * | Sets GWorld to the appropriate world for this client | ||
| EMouseCursor::Type | Retrieves the cursor that should be displayed by the OS | ||
| UWorld * | GetWorld () |
Use the viewports Scene to get a world. | |
| bool | InputAxis
(
FViewport* Viewport, |
Check an axis movement received by the viewport. | |
| bool | InputKey
(
const FInputKeyEventArgs& EventArgs |
Check a key event received by the viewport. | |
| void | |||
| void | |||
| bool | OverrideHighResScreenshotCaptureRegion
(
FIntRect& OutCaptureRegion |
Allow viewport client to override the current capture region | |
| void | ReceivedFocus
(
FViewport* InViewport |
||
| void | SetIsSimulateInEditorViewport
(
bool bInIsSimulateInEditorViewport |
Overridden from FViewElementDrawer
| Type | Name | Description | |
|---|---|---|---|
| void | Draw
(
const FSceneView* View, |
FViewElementDrawer interface |
Overridden from FGCObject
| Type | Name | Description | |
|---|---|---|---|
| void | AddReferencedObjects
(
FReferenceCollector& Collector |
GC references.Serialization. |
Constants
| Name | Description |
|---|---|
| bIsDroppingPreviewActor | If currently creating a preview actor. |
| DropPreviewActors | The actors that are currently being placed in the viewport via dragging |
| HoveredObjects | Static: List of objects we're hovering over |
| ViewComponentForActorCache | Caching for expensive FindViewComponentForActor. Invalidated once per Tick. |