SmApiUsdEnsurePluginRegistered#

Defined in SM_API_USD/inc/SmApiUsd.h

SmStatus SmApiUsdEnsurePluginRegistered()#

Ensure the omniSolid BrepArray schema plugin is registered with USD.

Idempotent. The import/export functions below already register the plugin on demand, so this is not required for a normal round-trip. It lets a host register explicitly at startup (failing fast on a bad or unset OMNISOLID_PLUGIN_PATH) or before reading BrepArray prims through the raw USD API. The plugin directory is taken from the OMNISOLID_PLUGIN_PATH environment variable.

Call it before opening any USD stage: if a stage was opened first, the BrepArray imports fail.

Returns:

SM_SUCCESS if the plugin is (already) registered, error code otherwise