UMeshTexturePaintingTool

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MeshPaintingToolset

Header

/Engine/Plugins/MeshPainting/Source/MeshPaintingToolset/Public/MeshTexturePaintingTool.h

Include

#include "MeshTexturePaintingTool.h"

Syntax

UCLASS()
class UMeshTexturePaintingTool :
    public UBaseBrushTool,
    public IMeshPaintSelectionInterface

Variables

Name Description

Protected variable

bool

 

bCachedClickRay

Protected variable

bool

 

bInDrag

Protected variable

bool

 

bResultValid

Protected variable

bool

 

bStampPending

Protected variable

double

 

InitialMeshArea

Protected variable

FRay

 

PendingClickRay

Protected variable

FVector2D

 

PendingClickScreenPosition

Protected variable

FRay

 

PendingStampRay

Protected variable UProperty Transient

TObjectPtr< UMe...

 

SelectionMechanic

Constructors

Name Description

Public function

UMeshTexturePaintingTool()

Functions

Name Description

Protected function

FPaintTextur...

 

AddPaintTargetData

(
    UTexture2D* InTexture
)

Protected function Virtual

void

 

CacheSelectionData()

Protected function

void

 

CacheTexturePaintData()

Protected function

double

 

CalculateTargetEdgeLength

(
    int TargetTriCount
)

Public function

void

 

ClearAllTextureOverrides()

Public function

void

 

CommitAllPaintedTextures()

Public function

void

 

CycleTextures

(
    int32 Direction
)

Protected function Virtual

void

 

FinishPainting()

Protected function

void

 

FinishPaintingTexture()

Protected function

void

 

GatherTextureTriangles

(
    IMeshPaintComponentAdapter* Ad...,
    int32 TriangleIndex,
    const int32 VertexIndices,
    TArray< FTexturePaintTriangleInfo >...,
    TArray< FTexturePaintMeshSectionInf...,
    int32 UVChannelIndex
)

Public function Const

int32

 

GetNumberOfPendingPaintChanges()

Returns the number of texture that require a commit.

Protected function

FPaintTextur...

 

GetPaintTargetData

(
    const UTexture2D* InTexture
)

Public function Virtual Const

bool

 

IsPainting()

Public function

FSimpleDeleg...

 

OnPaintingFinished()

Protected function

bool

 

Paint

(
    const TArrayView< TPair< FVector, F...
)

Protected function

bool

 

Paint

(
    const FVector& InRayOrigin,
    const FVector& InRayDirection
)

Protected function

void

 

PaintTexture

(
    FMeshPaintParameters& InParams,
    TArray< FTexturePaintTriangleInfo >...,
    const IMeshPaintComponentAdapter& ...
)

Public function

void

 

PaintTextureChanged

(
    const FAssetData& AssetData
)

Protected function Virtual

void

 

SetAdditionalPaintParameters

(
    FMeshPaintParameters& InPaintParam...
)

Public function Const

bool

 

ShouldFilterTextureAsset

(
    const FAssetData& AssetData
)

Protected function

void

 

StartPaintingTexture

(
    UMeshComponent* InMeshComponen...,
    const IMeshPaintComponentAdapter& ...
)

Protected function

void

 

UpdateResult()

Overridden from UBaseBrushTool

Name Description

Public function Virtual

double

 

EstimateMaximumTargetDimension()

Subclasses should implement this to give an estimate of target dimension for brush size scaling

Overridden from UMeshSurfacePointTool

Name Description

Public function Virtual

bool

 

HitTest

(
    const FRay& Ray,
    FHitResult& OutHit
)

Public function Virtual

void

 

OnBeginDrag

(
    const FRay& Ray
)

UMeshSurfacePointTool implementation

Public function Virtual

void

 

OnEndDrag

(
    const FRay& Ray
)

This function is called when the user releases the button driving a click-drag-release interaction

Public function Virtual

void

 

OnUpdateDrag

(
    const FRay& Ray
)

This function is called each frame that the user is in a click-drag-release interaction

Overridden from UInteractiveTool

Name Description

Public function Virtual Const

bool

 

CanAccept()

Public function Virtual Const

bool

 

HasAccept()

Public function Virtual Const

bool

 

HasCancel()

Public function Virtual

void

 

OnPropertyModified

(
    UObject* PropertySet,
    FProperty* Property
)

Automatically called by UInteractiveToolPropertySet.OnModified delegate to notify Tool of child property set changes

Public function Virtual

void

 

OnTick

(
    float DeltaTime
)

Action support/system

Public function Virtual

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

Allow the Tool to do any custom drawing (ie via PDI/RHI)

Public function Virtual

void

 

Setup()

Register InputBehaviors, etc

Public function Virtual

void

 

Shutdown

(
    EToolShutdownType ShutdownType
)

Called by ToolManager to shut down the Tool

Overridden from IClickDragBehaviorTarget

Name Description

Public function Virtual

FInputRayHit

 

CanBeginClickDragSequence

(
    const FInputDeviceRay& PressPos
)

IClickDragBehaviorTarget implementation.

Overridden from IModifierToggleBehaviorTarget

Name Description

Public function Virtual

void

 

OnUpdateModifierState

(
    int ModifierID,
    bool bIsOn
)

Notify target of current modifier state

Overridden from IMeshPaintSelectionInterface