UUVLayoutPreview

[UUVLayoutPreview](API\Plugins\ModelingComponents\Drawing\UUVLayoutPreview) is a utility object that creates and manages a 3D plane on which a UV layout for a 3D mesh is rendered.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ModelingComponents

Header

/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Drawing/UVLayoutPreview.h

Include

#include "Drawing/UVLayoutPreview.h"

Syntax

UCLASS(Transient)
class UUVLayoutPreview : public UObject

Remarks

UUVLayoutPreview is a utility object that creates and manages a 3D plane on which a UV layout for a 3D mesh is rendered. The UV layout

Variables

Name Description

Public variable UProperty

TObjectPtr< UMa...

 

BackingRectangleMaterial

Configure the backing rectangle material

Protected variable

bool

 

bSettingsModified

Public variable UProperty

bool

 

bShowBackingRectangle

Configure whether the backing rectangle should be shown

Protected variable

FViewCameraStat...

 

CameraState

Protected variable

UE::Geometry::F...

 

CurrentWorldFrame

Public variable UProperty

TObjectPtr< UPr...

 

PreviewMesh

PreviewMesh is initialized with a copy of an input mesh with UVs mapped to position, ie such that (X,Y,Z) = (U,V,0)

Public variable UProperty

TObjectPtr< UUV...

 

Settings

Visualization settings

Protected variable

FComponentMater...

 

SourceMaterials

Protected variable

UE::Geometry::F...

 

SourceObjectFrame

Protected variable

UE::Geometry::F...

 

SourceObjectWorldBounds

Public variable UProperty

TObjectPtr< UTr...

 

TriangleComponent

Set of additional triangles to draw, eg for backing rectangle, etc

Destructors

Name Description

Public function Virtual

~UUVLayoutPreview()

Functions

Name Description

Public function

void

 

CreateInWorld

(
    UWorld* World
)

Create preview mesh in the World with the given transform

Public function

void

 

Disconnect()

Remove and destroy preview mesh

Protected function

float

 

GetCurrentScale()

Public function

void

 

OnTick

(
    float DeltaTime
)

Tick the UV Layout Preview, allowing it to update various settings

Protected function

void

 

RecalculatePosition()

Public function

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

Render the UV Layout Preview, allowing it to update various settings

Public function

void

 

SetCurrentCameraState

(
    const FViewCameraState& CameraStat...
)

Update the current camera state, used to auto-position the UV layout preview

Public function

void

 

SetSourceMaterials

(
    const FComponentMaterialSet& Mater...
)

Configure material set for UV-space preview mesh

Public function

void

 

SetSourceWorldPosition

(
    FTransform WorldTransform,
    FBox WorldBounds
)

Specify the current world transform/bounds for the target object.

Public function

void

 

SetTransform

(
    const FTransform& UseTransform
)

Set the transform on the UV Layout preview mesh

Public function

void

 

SetVisible

(
    bool bVisible
)

Set the visibility of the UV Layout preview mesh

Public function

void

 

UpdateUVMesh

(
    const FDynamicMesh3* SourceMes...,
    int32 SourceUVLayer
)

Notify the UV Layout Preview that the source UVs have been modified