SmApiUsdHealFile#
Defined in SM_API_USD/inc/SmApiUsd.h
- SmStatus SmApiUsdHealFile(
- const char *pInputFile,
- const char *pOutputFile,
- int iThreadCount,
- std::vector<SmApiUsdBrepArrayHealResult> &rResults,
Heal BrepArray definitions in the layers used by the current USD composition and write the scene to pOutputFile, keeping its layers, references, native instancing, transforms and materials. Each BrepArray is healed in the layer that defines it; other layers (including package members) are written as standalone layers to
<output stem>_layers/beside the output, with references redirected. External layers used only by unselected variants are not enumerated or healed; their references keep pointing at the original assets.All or nothing: if any BrepArray fails, nothing is written. Rejected, since healing could not be written back faithfully: BRep geometry authored in a variant or composed from several layers, GeomSubsets other than face or Brep material bindings, and material subsets with opinions outside the BRep’s defining prim spec. This includes overrides or additional subsets in consuming layers or internal-reference sites.
- Parameters:
pInputFile – [in ]: USD file with BrepArray prims
pOutputFile – [in ]: Standalone .usd/.usda/.usdc file to write; must not exist
iThreadCount – [in ]: Healing threads; 0 = automatic
rResults – [out]: One entry per BrepArray, plus one with an empty prim path for a problem with the file as a whole
- Returns:
SM_SUCCESS once written; SM_ERR_INVALID_INPUT for a scene with no BrepArray or one that cannot be healed faithfully, or an existing output; SM_ERR when a BrepArray fails or a file cannot be read or written