Navigation
API > API/Plugins > API/Plugins/MeshPaintingToolset
| Name | UMeshPaintingSubsystem |
| Type | class |
| Header File | /Engine/Plugins/MeshPainting/Source/MeshPaintingToolset/Public/MeshPaintHelpers.h |
| Include Path | #include "MeshPaintHelpers.h" |
Syntax
UCLASS (MinimalAPI)
class UMeshPaintingSubsystem : public UEngineSubsystem
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UDynamicSubsystem → UEngineSubsystem → UMeshPaintingSubsystem
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMeshPaintingSubsystem() |
MeshPaintHelpers.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bNeedsRecache | bool | MeshPaintHelpers.h | ||
| LastPaintedComponent | TObjectPtr< UMeshComponent > | MeshPaintHelpers.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bSelectionContainsPerLODColors | bool | MeshPaintHelpers.h | ||
| bSelectionSupportsTextureAssetPaint | bool | MeshPaintHelpers.h | ||
| bSelectionSupportsTextureColorPaint | bool | MeshPaintHelpers.h | ||
| bSelectionSupportsVertexPaint | bool | MeshPaintHelpers.h | ||
| ComponentToAdapterMap | TMap< FString, TSharedPtr< IMeshPaintComponentAdapter > > | Map of geometry adapters for each selected mesh component | MeshPaintHelpers.h | |
| CopiedColorsByComponent | TArray< FPerComponentVertexColorData > | Contains copied vertex color data | MeshPaintHelpers.h | |
| CopiedTextureData | FImage | Contains copied texture data | MeshPaintHelpers.h | |
| PaintableComponents | TArray< TWeakObjectPtr< UMeshComponent > > | Mesh components within the current selection which are eligible for painting | MeshPaintHelpers.h | |
| SelectedMeshComponents | TArray< TWeakObjectPtr< UMeshComponent > > | Currently selected mesh components as provided by the mode class | MeshPaintHelpers.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddPaintableMeshComponent
(
UMeshComponent* InComponent |
MeshPaintHelpers.h | ||
void AddSelectedMeshComponents
(
const TArray< UMeshComponent* >& InComponents |
MeshPaintHelpers.h | ||
void AddToComponentToAdapterMap
(
const UMeshComponent* InComponent, |
MeshPaintHelpers.h | ||
void ApplyBrushToVertex
(
const FVector& VertexPosition, |
MeshPaintHelpers.h | ||
| MeshPaintHelpers.h | |||
bool ApplyPerTrianglePaintAction
(
IMeshPaintComponentAdapter* Adapter, |
Given the adapter, settings and view-information retrieves influences triangles and applies Action to them | MeshPaintHelpers.h | |
bool ApplyPerVertexPaintAction
(
FPerVertexPaintActionArgs& InArgs, |
Given arguments for an action, and an action - retrieves influences vertices and applies Action to them | MeshPaintHelpers.h | |
void ApplyVertexColorPaint
(
const FMeshPaintParameters& InParams, |
Applies Vertex Color Painting according to the given parameters | MeshPaintHelpers.h | |
void ApplyVertexColorsToAllLODs
(
IMeshPaintComponentAdapter& GeometryInfo, |
Applies the vertex colors found in LOD level 0 to all contained LOD levels in the SkeletalMeshComponent | MeshPaintHelpers.h | |
void ApplyVertexColorsToAllLODs
(
IMeshPaintComponentAdapter& GeometryInfo, |
Applies the vertex colors found in LOD level 0 to all contained LOD levels in the StaticMeshComponent | MeshPaintHelpers.h | |
void ApplyVertexColorsToAllLODs
(
IMeshPaintComponentAdapter& GeometryInfo, |
Applies vertex color painting found on LOD 0 to all lower LODs. | MeshPaintHelpers.h | |
void ApplyVertexWeightPaint
(
const FMeshPaintParameters& InParams, |
Applies Vertex Blend Weight Painting according to the given parameters | MeshPaintHelpers.h | |
void CacheSelectionData
(
const int32 PaintLODIndex, |
MeshPaintHelpers.h | ||
void ClearMeshTextureOverrides
(
const IMeshPaintComponentAdapter& GeometryInfo, |
MeshPaintHelpers.h | ||
void ClearPaintableMeshComponents() |
MeshPaintHelpers.h | ||
void ClearSelectedMeshComponents() |
MeshPaintHelpers.h | ||
void ClearSelectionLODColors() |
MeshPaintHelpers.h | ||
float ComputePaintMultiplier
(
float SquaredDistanceToVertex2D, |
Computes the Paint power multiplier value | MeshPaintHelpers.h | |
void CreateComponentMeshPaintTexture
(
UStaticMeshComponent* StaticMeshComponent |
Creates mesh paint texture associated with the mesh component | MeshPaintHelpers.h | |
void CreateComponentMeshPaintTexture
(
UStaticMeshComponent* StaticMeshComponent, |
MeshPaintHelpers.h | ||
UTexture * CreateMeshPaintTexture
(
UObject* Outer, |
Creates and returns a mesh paint texture that isn't attached to a mesh component | MeshPaintHelpers.h | |
bool DoesMeshComponentContainPerLODColors
(
const UMeshComponent* MeshComponent |
Checks whether or not the mesh components contains per lod colors (for all LODs) | MeshPaintHelpers.h | |
| MeshPaintHelpers.h | |||
| Fills all vertex colors for all LODs found in the given mesh component with Fill Color | MeshPaintHelpers.h | ||
bool FindHitResult
(
const FRay Ray, |
MeshPaintHelpers.h | ||
void ForceRenderMeshLOD
(
UMeshComponent* Component, |
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 ) | MeshPaintHelpers.h | |
FLinearColor GenerateColorForTextureWeight
(
const int32 NumWeights, |
Generate texture weight color for given number of weights and the to-paint index | MeshPaintHelpers.h | |
TSharedPtr< IMeshPaintComponentAdapter > GetAdapterForComponent
(
const UMeshComponent* InComponent |
Map of geometry adapters for each selected mesh component | MeshPaintHelpers.h | |
| Retrieves the vertex colors from the given LOD level in the Mesh | MeshPaintHelpers.h | ||
TArray< FPerComponentVertexColorData > GetCopiedColorsByComponent() |
MeshPaintHelpers.h | ||
FImage const & GetCopiedTexture() |
MeshPaintHelpers.h | ||
| Retrieves the per-instance vertex colors from the given LOD level in the StaticMeshComponent | MeshPaintHelpers.h | ||
void GetInstanceColorDataInfo
(
const UStaticMeshComponent* StaticMeshComponent, |
Retrieves the number of bytes used to store the per-instance LOD vertex color data from the mesh component | MeshPaintHelpers.h | |
uint32 GetMeshPaintTextureResourceSize
(
UMeshComponent* MeshComponent |
Retrieves the resource size for the mesh paint texture on the component | MeshPaintHelpers.h | |
FIntPoint GetMinMaxUVChannelsToPaint() |
MeshPaintHelpers.h | ||
int32 GetNumberOfLODs
(
const UMeshComponent* MeshComponent |
Returns the number of Mesh LODs for the given MeshComponent | MeshPaintHelpers.h | |
int32 GetNumberOfUVs
(
const UMeshComponent* MeshComponent, |
Returns the number of Texture Coordinates for the given MeshComponent | MeshPaintHelpers.h | |
TArray< UMeshComponent * > GetPaintableMeshComponents() |
MeshPaintHelpers.h | ||
bool GetPerVertexPaintInfluencedVertices
(
FPerVertexPaintActionArgs& InArgs, |
MeshPaintHelpers.h | ||
TArray< UMeshComponent * > GetSelectedMeshComponents() |
MeshPaintHelpers.h | ||
bool GetSelectionSupportsTextureAssetPaint() |
MeshPaintHelpers.h | ||
bool GetSelectionSupportsTextureColorPaint() |
MeshPaintHelpers.h | ||
bool GetSelectionSupportsVertexPaint() |
MeshPaintHelpers.h | ||
uint32 GetVertexColorBufferSize
(
UMeshComponent* MeshComponent, |
Retrieves the Vertex Color buffer size for the given LOD level in the Mesh | MeshPaintHelpers.h | |
TArray< FVector > GetVerticesForLOD
(
const UStaticMesh* StaticMesh, |
Retrieves the vertex positions from the given LOD level in the Mesh | MeshPaintHelpers.h | |
bool HasPaintableMesh
(
UActorComponent* Component |
MeshPaintHelpers.h | ||
bool IsPointInfluencedByBrush
(
const FVector& InPosition, |
Checks whether or not a point is influenced by the painting brush according to the given parameters | MeshPaintHelpers.h | |
bool IsPointInfluencedByBrush
(
const FVector2D& BrushSpacePosition, |
MeshPaintHelpers.h | ||
bool PaintVertex
(
const FVector& InVertexPosition, |
Applies vertex painting to InOutvertexColor according to the given parameters | MeshPaintHelpers.h | |
| Helper function to retrieve vertex color from a UTexture given a UVCoordinate | MeshPaintHelpers.h | ||
bool PropagateColorsToRawMesh
(
UStaticMesh* StaticMesh, |
Propagates per-instance vertex colors to the underlying Mesh for the given LOD Index | MeshPaintHelpers.h | |
void Refresh() |
MeshPaintHelpers.h | ||
void RemoveComponentInstanceVertexColors
(
UStaticMeshComponent* StaticMeshComponent |
Removes vertex colors associated with the mesh component | MeshPaintHelpers.h | |
void RemoveComponentMeshPaintTexture
(
UStaticMeshComponent* StaticMeshComponent |
Removes mesh paint texture associated with the mesh component | MeshPaintHelpers.h | |
void RemoveInstanceVertexColors
(
UObject* Obj |
Removes vertex colors associated with the object | MeshPaintHelpers.h | |
void ResetState() |
MeshPaintHelpers.h | ||
bool SelectionContainsPerLODColors() |
MeshPaintHelpers.h | ||
| Sets all vertex colors for a specific LOD level in the SkeletalMesh to FillColor | MeshPaintHelpers.h | ||
void SetCopiedColorsByComponent
(
TArray< FPerComponentVertexColorData >& InCopiedColors |
MeshPaintHelpers.h | ||
void SetCopiedTexture
(
UTexture* InTexture |
MeshPaintHelpers.h | ||
void SetInstanceColorDataForLOD
(
UStaticMeshComponent* MeshComponent, |
Sets the specific (LOD Index) per-instance vertex colors for the given StaticMeshComponent to the supplied Color array | MeshPaintHelpers.h | |
void SetInstanceColorDataForLOD
(
UStaticMeshComponent* MeshComponent, |
Sets the specific (LOD Index) per-instance vertex colors for the given StaticMeshComponent to a single Color value | MeshPaintHelpers.h | |
bool TryGetNumberOfLODs
(
const UMeshComponent* MeshComponent, |
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 | MeshPaintHelpers.h | |
void UpdatePaintSupportState() |
MeshPaintHelpers.h |