SmApiUsdImportBreps#

Defined in SM_API_USD/inc/SmApiUsd.h

SmStatus SmApiUsdImportBreps(
const char *pFileName,
std::vector<SmBrep*> &rSmBreps,
SmBoolean bHealerIsEnabled,
SmBoolean bAllowPartial,
std::vector<SmApiUsdBrepImportResult> *pImportResults,
)#

Load BRep prims from a USD file using an explicit partial-import policy.

This overload shares the strict behavior of the three-argument overload when bAllowPartial is FALSE: every discovered packed BRep must import, or no newly created BReps are appended. When bAllowPartial is TRUE, every locatable packed member is attempted, successful BReps are appended, and member failures are returned through pImportResults. A completed partial scan returns SM_SUCCESS even when individual results failed; stage- level and process-level failures such as an unreadable file, exhausted memory, or a fatal kernel status still return an error.

Parameters:
  • pFileName – [in ]: Path to USD file (.usda, .usdc, .usd)

  • rSmBreps – [i/o]: Existing entries are preserved; newly imported BReps are appended and owned by the caller

  • bHealerIsEnabled – [in ]: TRUE = run healer on each converted BRep

  • bAllowPartial – [in ]: TRUE = retain successful members when other members fail; FALSE = all-or-nothing

  • pImportResults – [out]: Pure output, cleared at entry. Required when bAllowPartial is TRUE; optional otherwise. Each nonNULL result BRep is a non-owning alias to the same pointer appended to rSmBreps.

Returns:

SM_SUCCESS after a completed scan according to the selected policy; error code for invalid arguments, stage-level failures, or any member failure in strict mode