Hello World Redux - Using Generic Prims
VERIFIED ON USD VERSION 21.08
In this tutorial, we revisit our Hello World! example, but this example passes in hard-coded typenames 'Xform' and 'Sphere', which correspond to the typenames appearing after the 'defs' in the ASCII representation of the scene description.
The UsdGeom schemata used in the previous example are the prim types that will always be supported in USD, and provide first-class API (with all the syntactic benefits to developer workflows, such as tab-completion) to introspect and author properties upon them.
Note that Define() will return a schema object on which the full schema-specific API is available, as opposed to DefinePrim() which returns a generic UsdPrim (which is accessible via GetPrim() on the schema object). Think of a UsdPrim as the object's generic, persistent presence in the scenegraph, and the schema as the first-class way of getting at its type-specific data.
The code above produces identical scene description to the previous tutorial, which you can see using usdcat:
In the next tutorial, we'll look at UsdGeom API in action on prim properties.