I am investigating the use of a codeless schema to store .otio content inside a .usd file, but sadly, the USD page does not provide any example.
I am looking for an example of the schema.usda and its use in python code.
Here’s an example of a codeless schema: usd-plugin-samples/src/usd-plugins/schema/omniExampleCodelessSchema at main · NVIDIA-Omniverse/usd-plugin-samples · GitHub .
Since a codeless schema doesn’t produce any C++ or Python interface, you need to use the generic USD functions to work with it. For example, Usd.Stage.DefinePrim()
and Usd.Prim.CreateAttribute()
.
Yep, and note that you do still need to run usdGenSchema
on your codeless schema.usda
so that it produces the generatedSchema.usda
and plugInfo.json
that the USD runtime uses to populate its SchemaRegistry.