SmApiUsdTessellateFile#

Defined in SM_API_USD/inc/SmApiUsd.h

SmStatus SmApiUsdTessellateFile(
const char *pInputFile,
const char *pOutputFile,
const SmTessellationParams &crParams,
SmBoolean bHealerIsEnabled,
int iThreadCount,
std::vector<SmApiUsdMeshTessellationResult> &rResults,
)#

Tessellate every BrepArray prim in a USD file and write a copy of the stage with a UsdGeomMesh per Brep under the default prim (or /Output), named tess_<prim>_<brep> (_<n> added if taken). Each mesh gets its Brep’s world transform, visibility and purpose (default time) and material. Relative asset paths are rewritten if the output is in another directory. The input layer is not modified, even if the caller has it open.

Prims are tessellated in parallel, each through SmApiUsdTessellateBrepArray. Breps fail independently: a failed Brep is reported and skipped, and a partial mesh is kept and reported.

Parameters:
  • pInputFile – [in ]: USD file with BrepArray prims

  • pOutputFile – [in ]: USD file to write; not written when no mesh is authored

  • crParams – [in ]: Tessellation quality controls

  • bHealerIsEnabled – [in ]: TRUE = run the healer while importing

  • iThreadCount – [in ]: Tessellation threads; 0 = automatic

  • rResults – [out]: One entry per Brep (or whole-prim failure), in prim order

Returns:

SM_SUCCESS once the output is written, even if some Breps failed (see rResults); SM_ERR_INVALID_INPUT when the file has no BrepArray prims; SM_ERR when the file cannot be opened, no mesh is authored, or the output cannot be written