FDatasmithStaticMeshImporter

Choose your operating system:

Windows

macOS

Linux

References

Module

DatasmithImporter

Header

/Engine/Plugins/Enterprise/DatasmithImporter/Source/DatasmithImporter/Public/DatasmithStaticMeshImporter.h

Include

#include "DatasmithStaticMeshImporter.h"

Syntax

class FDatasmithStaticMeshImporter

Functions

Name Description

Public function Static

void

 

BuildStaticMesh

(
    UStaticMesh* StaticMesh
)

Performs the actual building of the static mesh

Public function Static

void

 

BuildStaticMeshes

(
    const TArray< UStaticMesh* >&...,
    TFunction< bool*)>...
)

Performs the actual building of the static meshes in batch for better efficiency

Public function Static

TMap< TShare...

 

CalculateMeshesLightmapWeights

(
    const TSharedRef< IDatasmithScene >...
)

Calculates a lightmap density ratio for each IDatasmithMeshElement in the IDatasmithScene.

Public function Static

void

 

CleanupMeshDescriptions

(
    TArray< FMeshDescription >& MeshDe...
)

Cleanup any invalid data in mesh descriptions that might cause the editor to crash or behave erratically (i.e. Having vertex position with NaN values).

Public function Static

UStaticMesh ...

 

ImportStaticMesh

(
    const TSharedRef< IDatasmithMeshEle...,
    FDatasmithLegacyImporter& Datasmit...,
    EObjectFlags ObjectFlags,
    const FDatasmithStaticMeshImportOpt...,
    FDatasmithAssetsImportContext& Ass...,
    UStaticMesh* ExistingMesh
)

  1. Imports a static mesh from a Mesh Element

Public function Static

UStaticMesh ...

 

ImportStaticMesh

(
    const TSharedRef< IDatasmithMeshEle...,
    FDatasmithMeshElementPayload& Payl...,
    EObjectFlags ObjectFlags,
    const FDatasmithStaticMeshImportOpt...,
    FDatasmithAssetsImportContext& Ass...,
    UStaticMesh* ExistingMesh
)

Imports a static mesh from a Mesh Element

Public function Static

bool

 

PreBuildStaticMesh

(
    UStaticMesh* StaticMesh
)

Performs threadable build step on the static mesh, to be called before BuildStaticMesh

Public function Static

void

 

PreBuildStaticMeshes

(
    FDatasmithImportContext& ImportCon...
)

Builds the lightmap UVs and tangents for all the imported meshes.

Public function Static

void

 

SetupStaticMesh

(
    FDatasmithAssetsImportContext& Ass...,
    TSharedRef< IDatasmithMeshElement >...,
    UStaticMesh* StaticMesh,
    const FDatasmithStaticMeshImportOpt...,
    float LightmapWeight
)

Setup a UStaticMesh from an IDatasmithMeshElement.

Public function Static

bool

 

ShouldRecomputeNormals

(
    const FMeshDescription& MeshDescri...,
    int32 BuildRequirements
)

Public function Static

bool

 

ShouldRecomputeTangents

(
    const FMeshDescription& MeshDescri...,
    int32 BuildRequirements
)