USD Schema

USD Schema extensions

USD libraries are part of omni.usd.libs extension and are loaded as one of the first extensions to ensure that USD dlls are available for other extensions.

USD schemas itself are each in individual extension that can be part of any repository. USD schema extension is loaded after omni.usd.libs and ideally before omni.usd.

Example of schema extension config.toml file:

reloadable = false
# Load at the start, load all schemas with order -100 (with order -1000 the USD libs are loaded)
order = -100

category = "Simulation"
keywords = ["physics", "usd"]

# pxr modules to load
name = "pxr.UsdPhysics"

# python loader module
name = "usd.physics.schema"

# pxr libraries to be preloaded
path = "bin/${lib_prefix}usdPhysics${lib_ext}"

Schema extension contains pxr::Schema, its plugin registry and config.toml definition file. Additionally it contains a loading module omni/schema/_schema_name that does have python file containing the plugin registry code.


import os

from pxr import Plug

pluginsRoot = os.path.join(os.path.dirname(__file__), '../../../plugins')
physicsSchemaPath = pluginsRoot + '/UsdPhysics/resources'