UEditorStaticMeshLibrary

Utility class to altering and analyzing a StaticMesh and use the common functionalities of the Mesh Editor.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

EditorScriptingUtilities

Header

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorStaticMeshLibrary.h

Include

#include "EditorStaticMeshLibrary.h"

Syntax

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

Remarks

Utility class to altering and analyzing a StaticMesh and use the common functionalities of the Mesh Editor. The editor should not be in play in editor mode.

Functions

Name Description

Public function Static UFunction BlueprintCallable, Category

int32

 

AddSimpleCollisions

(
    UStaticMesh* StaticMesh,
    const EScriptingCollisionShapeType ...
)

Same as AddSimpleCollisionsWithNotification but changes are automatically applied.

Public function Static UFunction BlueprintCallable, Category

int32

 

AddSimpleCollisionsWithNotification

(
    UStaticMesh* StaticMesh,
    const EScriptingCollisionShapeType ...,
    bool bApplyChanges
)

Add simple collisions to a static mesh.

Public function Static UFunction BlueprintCallable, Category

bool

 

AddUVChannel

(
    UStaticMesh* StaticMesh,
    int32 LODIndex
)

Adds an empty UV channel at the end of the existing channels on the given LOD of a StaticMesh.

Public function Static UFunction BlueprintCallable, Category

bool

 

BulkSetConvexDecompositionCollisions

(
    const TArray< UStaticMesh* >&...,
    int32 HullCount,
    int32 MaxHullVerts,
    int32 HullPrecision
)

Same as SetConvexDecompositionCollisionsWithNotification but changes are automatically applied.

Public function Static UFunction BlueprintCallable, Category

bool

 

BulkSetConvexDecompositionCollisionsWithNotification

(
    const TArray< UStaticMesh* >&...,
    int32 HullCount,
    int32 MaxHullVerts,
    int32 HullPrecision,
    bool bApplyChanges
)

Compute convex collisions for a set of static meshes.

Public function Static UFunction BlueprintCallable, Category

void

 

EnableSectionCastShadow

(
    UStaticMesh* StaticMesh,
    bool bCastShadow,
    int32 LODIndex,
    int32 SectionIndex
)

Enables/disables mesh section shadow casting for a specific LOD.

Public function Static UFunction BlueprintCallable, Category

void

 

EnableSectionCollision

(
    UStaticMesh* StaticMesh,
    bool bCollisionEnabled,
    int32 LODIndex,
    int32 SectionIndex
)

Enables/disables mesh section collision for a specific LOD.

Public function Static UFunction BlueprintCallable, Category

bool

 

GenerateBoxUVChannel

(
    UStaticMesh* StaticMesh,
    int32 LODIndex,
    int32 UVChannelIndex,
    const FVector& Position,
    const FRotator& Orientation,
    const FVector& Size
)

Generates box UV mapping in the specified UV channel on the given LOD of a StaticMesh.

Public function Static UFunction BlueprintCallable, Category

bool

 

GenerateCylindricalUVChannel

(
    UStaticMesh* StaticMesh,
    int32 LODIndex,
    int32 UVChannelIndex,
    const FVector& Position,
    const FRotator& Orientation,
    const FVector2D& Tiling
)

Generates cylindrical UV mapping in the specified UV channel on the given LOD of a StaticMesh.

Public function Static UFunction BlueprintCallable, Category

bool

 

GeneratePlanarUVChannel

(
    UStaticMesh* StaticMesh,
    int32 LODIndex,
    int32 UVChannelIndex,
    const FVector& Position,
    const FRotator& Orientation,
    const FVector2D& Tiling
)

Generates planar UV mapping in the specified UV channel on the given LOD of a StaticMesh.

Public function Static UFunction BlueprintPure, Category

TEnumAsByte<...

 

GetCollisionComplexity

(
    UStaticMesh* StaticMesh
)

Get the Collision Trace behavior of a static mesh

Public function Static UFunction BlueprintCallable, Category

int32

 

GetConvexCollisionCount

(
    UStaticMesh* StaticMesh
)

Get number of convex collisions present on a static mesh.

Public function Static UFunction BlueprintCallable, Category

int32

 

GetLodCount

(
    UStaticMesh* StaticMesh
)

Get number of LODs present on a static mesh.

Public function Static UFunction BlueprintPure, Category

TArray< floa...

 

GetLodScreenSizes

(
    UStaticMesh* StaticMesh
)

Get an array of LOD screen sizes for evaluation.

Public function Static UFunction BlueprintPure, Category

int32

 

GetNumberMaterials

(
    UStaticMesh* StaticMesh
)

Get number of StaticMesh verts for an LOD

Public function Static UFunction BlueprintPure, Category

int32

 

GetNumberVerts

(
    UStaticMesh* StaticMesh,
    int32 LODIndex
)

Get number of StaticMesh verts for an LOD

Public function Static UFunction BlueprintCallable, Category

int32

 

GetNumUVChannels

(
    UStaticMesh* StaticMesh,
    int32 LODIndex
)

Returns the number of UV channels for the given LOD of a StaticMesh.

Public function Static UFunction BlueprintCallable, Category

int32

 

GetSimpleCollisionCount

(
    UStaticMesh* StaticMesh
)

Get number of simple collisions present on a static mesh.

Public function Static UFunction BlueprintPure, Category

bool

 

HasInstanceVertexColors

(
    UStaticMeshComponent* StaticMe...
)

Check whether a static mesh component has vertex colors

Public function Static UFunction BlueprintPure, Category

bool

 

HasVertexColors

(
    UStaticMesh* StaticMesh
)

Check whether a static mesh has vertex colors

Public function Static UFunction BlueprintCallable, Category

bool

 

InsertUVChannel

(
    UStaticMesh* StaticMesh,
    int32 LODIndex,
    int32 UVChannelIndex
)

Inserts an empty UV channel at the specified channel index on the given LOD of a StaticMesh.

Public function Static UFunction BlueprintPure, Category

bool

 

IsSectionCollisionEnabled

(
    UStaticMesh* StaticMesh,
    int32 LODIndex,
    int32 SectionIndex
)

Checks if a specific LOD mesh section has collision.

Public function Static UFunction BlueprintCallable, Category

bool

 

RemoveCollisions

(
    UStaticMesh* StaticMesh
)

Same as RemoveCollisionsWithNotification but changes are applied.

Public function Static UFunction BlueprintCallable, Category

bool

 

RemoveCollisionsWithNotification

(
    UStaticMesh* StaticMesh,
    bool bApplyChanges
)

Remove collisions from a static mesh.

Public function Static UFunction BlueprintCallable, Category

bool

 

RemoveLods

(
    UStaticMesh* StaticMesh
)

Remove LODs on a static mesh except LOD 0.

Public function Static UFunction BlueprintCallable, Category

bool

 

RemoveUVChannel

(
    UStaticMesh* StaticMesh,
    int32 LODIndex,
    int32 UVChannelIndex
)

Removes the UV channel at the specified channel index on the given LOD of a StaticMesh.

Public function Static UFunction BlueprintCallable, Category

void

 

SetAllowCPUAccess

(
    UStaticMesh* StaticMesh,
    bool bAllowCPUAccess
)

Sets StaticMeshFlag bAllowCPUAccess

Public function Static UFunction BlueprintCallable, Category

bool

 

SetConvexDecompositionCollisions

(
    UStaticMesh* StaticMesh,
    int32 HullCount,
    int32 MaxHullVerts,
    int32 HullPrecision
)

Same as SetConvexDecompositionCollisionsWithNotification but changes are automatically applied.

Public function Static UFunction BlueprintCallable, Category

bool

 

SetConvexDecompositionCollisionsWithNotification

(
    UStaticMesh* StaticMesh,
    int32 HullCount,
    int32 MaxHullVerts,
    int32 HullPrecision,
    bool bApplyChanges
)

Add a convex collision to a static mesh.

Public function Static UFunction BlueprintCallable, Category, Meta

bool

 

SetGenerateLightmapUVs

(
    UStaticMesh* StaticMesh,
    bool bGenerateLightmapUVs
)

Set Generate Lightmap UVs for StaticMesh

Public function Static UFunction BlueprintCallable, Category

int32

 

SetLodFromStaticMesh

(
    UStaticMesh* DestinationStatic...,
    int32 DestinationLodIndex,
    UStaticMesh* SourceStaticMesh,
    int32 SourceLodIndex,
    bool bReuseExistingMaterialSlots
)

Adds or create a LOD at DestinationLodIndex using the geometry from SourceStaticMesh SourceLodIndex

Public function Static UFunction BlueprintCallable, Category

int32

 

SetLods

(
    UStaticMesh* StaticMesh,
    const FEditorScriptingMeshReduction...
)

Same as SetLodsWithNotification but changes are applied.

Public function Static UFunction BlueprintCallable, Category

int32

 

SetLodsWithNotification

(
    UStaticMesh* StaticMesh,
    const FEditorScriptingMeshReduction...,
    bool bApplyChanges
)

Remove then add LODs on a static mesh.

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