UTexturePaintToolset

Helpers functions for texture painting functionality

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MeshPaintingToolset

Header

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

Include

#include "TexturePaintToolset.h"

Syntax

UCLASS()
class UTexturePaintToolset : public UBlueprintFunctionLibrary

Remarks

Helpers functions for texture painting functionality

Functions

Name Description

Public function Static

void

 

CopyTextureToRenderTargetTexture

(
    UTexture* SourceTexture,
    UTextureRenderTarget2D* Render...,
    ERHIFeatureLevel::Type FeatureLevel
)

Static: Copies a texture to a render target texture

Public function Static

UTexture2D &...

 

CreateTempUncompressedTexture

(
    UTexture2D* SourceTexture
)

Static: Creates a temporary texture used to transfer data to a render target in memory

Public function Static

bool

 

DoesMeshComponentUseTexture

(
    UMeshComponent* MeshComponent,
    UTexture* Texture
)

Checks whether or not the given MeshComponent's materials use the specified texture

Public function Static

void

 

FindMaterialIndicesUsingTexture

(
    const UTexture* Texture,
    const UMeshComponent* MeshComp...,
    TArray< int32 >& OutIndices
)

Tries to find Materials using the given Texture and retrieve the corresponding material indices from the MEsh Compon

Public function Static

bool

 

GenerateSeamMask

(
    UMeshComponent* MeshComponent,
    int32 UVSet,
    UTextureRenderTarget2D* SeamRe...,
    UTexture2D* Texture,
    UTextureRenderTarget2D* Render...
)

Will generate a mask texture, used for texture dilation, and store it in the passed in render target

Public function Static

constexpr in...

 

GetMaxSupportedBytesPerPixelForPainting()

Returns the maximum bytes per pixel that are supported for source textures when painting.

Public function Static

constexpr EP...

 

GetTempUncompressedTexturePixelFormat()

Returns the pixel format that CreateTempUncompressedTexture uses to create render target data for painting.

Public function Static

void

 

RetrieveMeshSectionsForMaterialIndices

(
    const UMeshComponent* MeshComp...,
    int32 LODIndex,
    const TArray< int32 >& MaterialInd...,
    TArray< FTexturePaintMeshSectionInf...
)

Retrieve LOD mesh sections from MeshComponent which contain one of the Material Indices

Public function Static

void

 

RetrieveMeshSectionsForTextures

(
    const UMeshComponent* MeshComp...,
    int32 LODIndex,
    TArray< const UTexture* > Text...,
    TArray< FTexturePaintMeshSectionInf...
)

Retrieve LOD mesh sections from MeshComponent which use one of the given textures

Public function Static

void

 

RetrieveTexturesForComponent

(
    const UMeshComponent* Componen...,
    IMeshPaintComponentAdapter* Ad...,
    TArray< FPaintableTexture >& OutTe...
)

Retrieves all Paintable Textures from the given MeshComponent

Public function Static

void

 

SetupInitialRenderTargetData

(
    UTexture2D* InTextureSource,
    UTextureRenderTarget2D* InRend...
)

Makes sure that the render target is ready to paint on