UMeshPaintingToolset

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

MeshPaintingToolset

Header

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

Include

#include "MeshPaintHelpers.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UMeshPaintingToolset : public UBlueprintFunctionLibrary

Functions

Name Description

Public function Static

void

 

ApplyBrushToVertex

(
    const FVector& VertexPosition,
    const FMatrix& InverseBrushMatrix,
    const float BrushRadius,
    const float BrushFalloffAmount,
    const float BrushStrength,
    const T& PaintValue,
    T& InOutValue
)

Public function Static

void

 

ApplyFillWithMask

(
    FColor& InOutColor,
    const FColor& MaskColor,
    const FColor& FillColor
)

Public function Static

bool

 

ApplyPerTrianglePaintAction

(
    IMeshPaintComponentAdapter* Ad...,
    const FVector& CameraPosition,
    const FVector& HitPosition,
    const UBrushBaseProperties* Se...,
    FPerTrianglePaintAction Action,
    bool bOnlyFrontFacingTriangles
)

Given the adapter, settings and view-information retrieves influences triangles and applies Action to them

Public function Static

bool

 

ApplyPerVertexPaintAction

(
    FPerVertexPaintActionArgs& InArgs,
    FPerVertexPaintAction Action
)

Given arguments for an action, and an action - retrieves influences vertices and applies Action to them

Public function Static

void

 

ApplyVertexColorPaint

(
    const FMeshPaintParameters& InPara...,
    const FLinearColor& OldColor,
    FLinearColor& NewColor,
    const float PaintAmount
)

Applies Vertex Color Painting according to the given parameters

Public function Static

void

 

ApplyVertexColorsToAllLODs

(
    IMeshPaintComponentAdapter& Geomet...,
    USkeletalMeshComponent* Skelet...
)

Applies the vertex colors found in LOD level 0 to all contained LOD levels in the SkeletalMeshComponent

Public function Static

void

 

ApplyVertexColorsToAllLODs

(
    IMeshPaintComponentAdapter& Geomet...,
    UStaticMeshComponent* StaticMe...
)

Applies the vertex colors found in LOD level 0 to all contained LOD levels in the StaticMeshComponent

Public function Static

void

 

ApplyVertexColorsToAllLODs

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

Applies vertex color painting found on LOD 0 to all lower LODs.

Public function Static

void

 

ApplyVertexWeightPaint

(
    const FMeshPaintParameters& InPara...,
    const FLinearColor& OldColor,
    FLinearColor& NewColor,
    const float PaintAmount
)

Applies Vertex Blend Weight Painting according to the given parameters

Public function Static

void

 

ClearMeshTextureOverrides

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

Clears all texture overrides for this component.

Public function Static

float

 

ComputePaintMultiplier

(
    float SquaredDistanceToVertex2D,
    float BrushStrength,
    float BrushInnerRadius,
    float BrushRadialFalloff,
    float BrushInnerDepth,
    float BrushDepthFallof,
    float VertexDepthToBrush
)

Computes the Paint power multiplier value

Public function Static

bool

 

DoesMeshComponentContainPerLODColors

(
    const UMeshComponent* MeshComp...
)

Checks whether or not the mesh components contains per lod colors (for all LODs)

Public function Static

void

 

FillSkeletalMeshVertexColors

(
    USkeletalMeshComponent* MeshCo...,
    int32 LODIndex,
    const FColor FillColor,
    const FColor MaskColor
)

Public function Static

void

 

FillStaticMeshVertexColors

(
    UStaticMeshComponent* MeshComp...,
    int32 LODIndex,
    const FColor FillColor,
    const FColor MaskColor
)

Fills all vertex colors for all LODs found in the given mesh component with Fill Color

Public function Static

void

 

ForceRenderMeshLOD

(
    UMeshComponent* Component,
    int32 LODIndex
)

Forces the component to render LOD level at LODIndex instead of the view-based LOD level ( X = 0 means do not force the LOD, X > 0 means force the lod to X - 1 )

Public function Static

FLinearColor

 

GenerateColorForTextureWeight

(
    const int32 NumWeights,
    const int32 WeightIndex
)

Generate texture weight color for given number of weights and the to-paint index

Public function Static

TArray< FCol...

 

GetColorDataForLOD

(
    const UStaticMesh* StaticMesh,
    int32 LODIndex
)

Retrieves the vertex colors from the given LOD level in the Static Mesh

Public function Static

TArray< FCol...

 

GetInstanceColorDataForLOD

(
    const UStaticMeshComponent* Me...,
    int32 LODIndex
)

Retrieves the per-instance vertex colors from the given LOD level in the StaticMeshComponent

Public function Static

void

 

GetInstanceColorDataInfo

(
    const UStaticMeshComponent* St...,
    int32 LODIndex,
    int32& OutTotalInstanceVertexColor...
)

Retrieves the number of bytes used to store the per-instance LOD vertex color data from the static mesh component

Public function Static

int32

 

GetNumberOfLODs

(
    const UMeshComponent* MeshComp...
)

Returns the number of Mesh LODs for the given MeshComponent

Public function Static

int32

 

GetNumberOfUVs

(
    const UMeshComponent* MeshComp...,
    int32 LODIndex
)

Returns the number of Texture Coordinates for the given MeshComponent

Public function Static

bool

 

GetPerVertexPaintInfluencedVertices

(
    FPerVertexPaintActionArgs& InArgs,
    TSet< int32 >& InfluencedVertices
)

Public function Static

uint32

 

GetVertexColorBufferSize

(
    UMeshComponent* MeshComponent,
    int32 LODIndex,
    bool bInstance
)

Retrieves the Vertex Color buffer size for the given LOD level in the Static Mesh

Public function Static

TArray< FVec...

 

GetVerticesForLOD

(
    const UStaticMesh* StaticMesh,
    int32 LODIndex
)

Retrieves the vertex positions from the given LOD level in the Static Mesh

Public function Static

bool

 

HasPaintableMesh

(
    UActorComponent* Component
)

Public function Static

bool

 

IsInVRMode

(
    const FEditorViewportClient* V...
)

Checks whether or not the given Viewport Client is a VR editor viewport client

Public function Static

bool

 

IsPointInfluencedByBrush

(
    const FVector2D& BrushSpacePositio...,
    const float BrushRadiusSquared,
    float& OutInRangeValue
)

Public function Static

bool

 

IsPointInfluencedByBrush

(
    const FVector& InPosition,
    const FMeshPaintParameters& InPara...,
    float& OutSquaredDistanceToVertex2...,
    float& OutVertexDepthToBrush
)

Checks whether or not a point is influenced by the painting brush according to the given parameters

Public function Static

bool

 

PaintVertex

(
    const FVector& InVertexPosition,
    const FMeshPaintParameters& InPara...,
    FColor& InOutVertexColor
)

Applies vertex painting to InOutvertexColor according to the given parameters

Public function Static

FColor

 

PickVertexColorFromTextureData

(
    const uint8* MipData,
    const FVector2D& UVCoordinate,
    const UTexture2D* Texture,
    const FColor ColorMask
)

Helper function to retrieve vertex color from a UTexture given a UVCoordinate

Public function Static

bool

 

PropagateColorsToRawMesh

(
    UStaticMesh* StaticMesh,
    int32 LODIndex,
    FStaticMeshComponentLODInfo& Compo...
)

Propagates per-instance vertex colors to the underlying Static Mesh for the given LOD Index

Public function Static

void

 

RemoveComponentInstanceVertexColors

(
    UStaticMeshComponent* StaticMe...
)

Removes vertex colors associated with the static mesh component

Public function Static

void

 

RemoveInstanceVertexColors

(
    UObject* Obj
)

Removes vertex colors associated with the object

Public function Static

void

 

SetColorDataForLOD

(
    USkeletalMesh* SkeletalMesh,
    int32 LODIndex,
    const FColor FillColor,
    const FColor MaskColor
)

Sets all vertex colors for a specific LOD level in the SkeletalMesh to FillColor

Public function Static

void

 

SetInstanceColorDataForLOD

(
    UStaticMeshComponent* MeshComp...,
    int32 LODIndex,
    const TArray< FColor >& Colors
)

Sets the specific (LOD Index) per-instance vertex colors for the given StaticMeshComponent to the supplied Color array

Public function Static

void

 

SetInstanceColorDataForLOD

(
    UStaticMeshComponent* MeshComp...,
    int32 LODIndex,
    const FColor FillColor,
    const FColor MaskColor
)

Sets the specific (LOD Index) per-instance vertex colors for the given StaticMeshComponent to a single Color value

Public function Static

bool

 

TryGetNumberOfLODs

(
    const UMeshComponent* MeshComp...,
    int32& OutNumLODs
)

OutNumLODs is set to number of Mesh LODs for the given MeshComponent and returns true, or returns false of given mesh component has no valid LODs

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss