SmApiUsdExportMesh#

Defined in SM_API_USD/inc/SmApiUsd.h

SmStatus SmApiUsdExportMesh(
const char *pFileName,
SmPolyBrep *pSmPolyBrep,
)#

Export a single polygon mesh (SmPolyBrep) to a new USD file as UsdGeomMesh.

Creates a new USD stage, writes the mesh as /World/Mesh0, and saves the stage to pFileName.

Note

Behavior matches SmApiUsdExportMeshes with a single-element vector (always Mesh0).

Parameters:
  • pFileName – [in ]: Output USD file path (.usda, .usdc, or .usd); must not be NULL

  • pSmPolyBrep – [i/o]: Mesh to export; must not be NULL. Caller retains ownership of pSmPolyBrep. The mesh may be mutated the same way as in SmApiUsdExportMeshes (see that function’s rSmPolyBreps documentation).

Returns:

SM_SUCCESS on success, or an error code (e.g. SM_ERR) on failure