UMeshGroupPaintTool

Mesh Element Paint Tool Class

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MeshModelingToolsExp

Header

/Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsExp/Public/MeshGroupPaintTool.h

Include

#include "MeshGroupPaintTool.h"

Syntax

UCLASS()
class UMeshGroupPaintTool : public UMeshSculptToolBase

Remarks

Mesh Element Paint Tool Class

Variables

Name Description

Protected variable

TSet< int32 >

 

AccumulatedTriangleROI

Protected variable

TUniquePtr< FDy...

 

ActiveGroupEditBuilder

Protected variable

TUniquePtr< UE:...

 

ActiveGroupSet

Protected variable

bool

 

bHavePendingAction

Protected variable

bool

 

bPendingPickGroup

Protected variable

bool

 

bPendingToggleFreezeGroup

Protected variable

bool

 

bUndoUpdatePending

Protected variable UProperty

TObjectPtr< UDy...

 

DynamicMeshComponent

Public variable UProperty

TObjectPtr< UGr...

 

FilterProperties

Filters on paint brush

Public variable UProperty

TObjectPtr< UMe...

 

FreezeActions

Protected variable

TArray< int32 >

 

FrozenGroups

Protected variable UProperty

TObjectPtr< UMe...

 

MeshElementsDisplay

Protected variable

TArray< int >

 

NormalsBuffer

Protected variable

TArray< int32 >

 

NormalSeamEdges

Protected variable

UE::Geometry::F...

 

Octree

Protected variable

FDelegateHandle

 

OnDynamicMeshComponentChangedHandle

Protected variable

EMeshGroupPaint...

 

PendingAction

Protected variable

EMeshGroupPaint...

 

PendingStampType

Public variable UProperty

TObjectPtr< UPo...

 

PolygroupLayerProperties

Public variable UProperty

TObjectPtr< UPo...

 

PolyLassoMechanic

Marquee Support

Protected variable UProperty

TObjectPtr< AIn...

 

PreviewMeshActor

Internals

Protected variable

TArray< int32 >

 

ROIGroupBuffer

Protected variable

TArray< int32 >

 

ROITriangleBuffer

Protected variable

TArray< int >

 

TempROIBuffer

Protected variable

TSet< int >

 

TriangleROI

Protected variable

TArray< FVector...

 

TriNormals

Protected variable

TArray< int32 >

 

UVSeamEdges

Protected variable

TArray< int >

 

VertexROI

Protected variable

TSet< int >

 

VertexSetBuffer

Protected variable

TArray< bool >

 

VisibilityFilterBuffer

Functions

Name Description

Public function

void

 

AllocateNewGroupAndSetAsCurrentAction()

Protected function Virtual

void

 

ApplyAction

(
    EMeshGroupPaintToolActions ActionTy...
)

Protected function

bool

 

ApplyStamp()

Public function

void

 

ApplyVisibilityFilter

(
    const TArray< int32 >& Triangles,
    TArray< int32 >& VisibleTriangles
)

Public function

void

 

ApplyVisibilityFilter

(
    TSet< int32 >& Triangles,
    TArray< int32 >& ROIBuffer,
    TArray< int32 >& OutputBuffer
)

Protected function

void

 

BeginChange()

Protected function

void

 

ClearAllFrozenGroups()

Public function

void

 

ClearAllGroupsAction()

Public function

void

 

ClearCurrentGroupAction()

Protected function

void

 

EmitFrozenGroupsChange

(
    const TArray< int32 >& FromGroups,
    const TArray< int32 >& ToGroups,
    const FText& ChangeText
)

Protected function

void

 

EndChange()

Public function

void

 

FloodFillCurrentGroupAction()

Protected function

void

 

FreezeOtherGroups

(
    int32 GroupID
)

Protected function

FColor

 

GetColorForGroup

(
    int32 GroupID
)

Protected function

bool

 

GetInEraseStroke()

Public function

void

 

GrowCurrentGroupAction()

Public function Const

bool

 

HaveVisibilityFilter()

Public function Const

bool

 

IsInBrushSubMode()

Protected function

void

 

OnDynamicMeshComponentChanged

(
    UDynamicMeshComponent* Compone...,
    const FMeshVertexChange* Chang...,
    bool bRevert
)

Realtime visualization

Protected function

void

 

OnPolyLassoFinished

(
    const FCameraPolyLasso& Lasso,
    bool bCanceled
)

Protected function

void

 

OnSelectedGroupLayerChanged()

Protected function

void

 

PrecomputeFilterData()

Public function Virtual

void

 

RequestAction

(
    EMeshGroupPaintToolActions ActionTy...
)

Action support

Public function

void

 

SetTrianglesToGroupID

(
    const TSet< int32 >& Triangles,
    int32 ToGroupID,
    bool bIsErase
)

Public function

void

 

ShrinkCurrentGroupAction()

Protected function

bool

 

SyncMeshWithGroupBuffer

(
    FDynamicMesh3* Mesh
)

Protected function

void

 

ToggleFrozenGroup

(
    int32 GroupID
)

Protected function

void

 

UpdateActiveGroupLayer()

Protected function

bool

 

UpdateBrushPosition

(
    const FRay& WorldRay
)

Protected function

void

 

UpdateBrushType

(
    EMeshGroupPaintBrushType BrushType
)

Protected function

void

 

UpdateROI

(
    const FSculptBrushStamp& CurrentSt...
)

Protected function

bool

 

UpdateStampPosition

(
    const FRay& WorldRay
)

Protected function

void

 

UpdateSubToolType

(
    EMeshGroupPaintInteractionType NewT...
)

Protected function

void

 

WaitForPendingUndoRedo()

Overridden from UMeshSculptToolBase

Name Description

Public function Virtual

void

 

CommitResult

(
    UBaseDynamicMeshComponent* Com...,
    bool bModifiedTopology
)

Subclass can override this to change what results are written.

Public function Virtual

void

 

DecreaseBrushRadiusAction()

Public function Virtual

void

 

DecreaseBrushRadiusSmallStepAction()

Protected function Virtual

int32

 

FindHitSculptMeshTriangle

(
    const FRay3d& LocalRay
)

Protected function Virtual

int32

 

FindHitTargetMeshTriangle

(
    const FRay3d& LocalRay
)

Protected function Virtual

TUniquePtr< ...

 

GetActiveBrushOp()

Protected function Virtual

FDynamicMesh...

 

GetBaseMesh()

Protected function Virtual Const

const FDynam...

 

GetBaseMesh()

Protected function Virtual

UBaseDynamic...

 

GetSculptMeshComponent()

UMeshSculptToolBase API.

Public function Virtual

void

 

IncreaseBrushRadiusAction()

We override these so we can update the separate BrushSize property added for this tool

Public function Virtual

void

 

IncreaseBrushRadiusSmallStepAction()

Protected function Virtual

void

 

OnBeginStroke

(
    const FRay& WorldRay
)

Protected function Virtual

void

 

OnEndStroke()

Protected function Virtual Const

bool

 

ShowWorkPlane()

Overridden from UInteractiveTool

Name Description

Public function Virtual Const

bool

 

CanAccept()

Public function Virtual

void

 

DrawHUD

(
    FCanvas* Canvas,
    IToolsContextRenderAPI* Render...
)

Allow the Tool to do any custom screen space drawing

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

 

RegisterActions

(
    FInteractiveToolActionSet& ActionS...
)

Override this function to register the set of Actions this Tool supports, using FInteractiveToolActionSet::RegisterAction.

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 IHoverBehaviorTarget

Name Description

Public function Virtual

bool

 

OnUpdateHover

(
    const FInputDeviceRay& DevicePos
)

Update active hover sequence with new input position