Skip to content

Latest commit

 

History

History
139 lines (97 loc) · 6.82 KB

Example.md

File metadata and controls

139 lines (97 loc) · 6.82 KB

The usd library

The usd library graphs are built up with a few layers that each hold some core node for building usd assets and files.

These single nodes when combined(parented or strung together) can build more complicated usd concepts. Please see the examples in this git repo for reference.

Core layers

Alt text

All the core layers can be opened up in NXT by simply opening pxr_usd_tools or as individual layers. At the moment there are 5 layer to draw from: tools, usd, geom, model_api and variants.

I will be adding to these as I go along.

pxr_usd

nodes

Alt text

  • OpenOrFind: A more robust method of opening or creating usd files.
  • CreateNew: Creates a new empty layer with the given identifier.
  • StageOpen: Attempt to find a matching existing stage in a cache if UsdStageCacheContext objects exist on the stack. Failing that, create a new stage and recursively compose prims defined within and referenced by the layer at filePath, which must already exist.
  • RootLayerSave: Save out the Root layer to a stage.
  • GetPrimAtPath: Returns the prim at the given path.
  • GetPropertyNames: Return all of this prim's property names (attributes and relationships), including all builtin properties
  • GetAttribute: Return a UsdAttribute with the name given.
  • SetAttribute: Set a UsdAttribute with the name given.
  • SetDefaultPrim: Set the DefaultPrim of a stage.
  • GetDefaultPrim: Get the DefaultPrim of a stage.
  • AbsoluteRoot: Get the root path of a stage.

pxr_usd_geom

nodes

Alt text

  • Sphere: Construct a UsdGeom Sphere on UsdPrim. details
  • Cube: Construct a UsdGeom Cube on UsdPrim. details
  • Mesh: Construct a UsdGeomMesh on UsdPrim. details
  • Cone: Construct a UsdGeom Cone on UsdPrim. details
  • Points: Construct a UsdGeom Points on UsdPrim. details
  • NurbsPatch: Construct a UsdGeom NurbsPatch on UsdPrim. details
  • BasisCurves: Construct a UsdGeom BasisCurves on UsdPrim. details
  • Cylinder: Construct a UsdGeom Cylinder on UsdPrim. details
  • NurbsCurves: Construct a UsdGeom NurbsCurves on UsdPrim. details
  • Capsule: Construct a UsdGeom Capsule on UsdPrim. details
  • DefinePrim: Construct a UsdGeom DefinePrim on UsdPrim. details
  • Xform: Construct a UsdGeom Xform on UsdPrim. details

pxr_usd_variants

nodes

Alt text

  • AddVariantSet: Add a variant set to a prim of your choice.
  • AddVariant: Add a variant to a variant set.
  • SetVariantSelection: Set a variant selection of your choice.
  • GetVariantEditContext: Edit context to a selected variant.

pxr_usd_model_api

nodes

Alt text

  • ModelApi:
  • SetKind: Set a kind for a usd prim
  • SetAssetName: Give a prim a asset name
  • SetAssetVersion: Give a prim an asset version
  • SetAssetIdentifier: Sets the model's asset identifier to the given asset path
  • SetPayloadAssetDependencies: Returns the list of asset dependencies referenced inside the payload of the model.

See ModelApiExample on how to use these nodes. Alt text

pxr_usd_tools

nodes

Alt text

  • UsdView: Open up a usdview form inside nxt
  • UsdCat: Open up a terminal and cat usd file from within nxt
  • UsdDiff: Open up a terminal and diff usd file from within nxt
  • UsdConvert: Convert abc/usd file to usd file type of your choice.

pxr_usd_layers

nodes

Alt text

  • Reference stack: Open or create a reference for a given usd file.
  • Payload stack: Open or create a payload for a given usd file.
  • sublayer stack: Open or create a sublayer for a given usd file.

See AddLayersExample on how to use these nodes.

Example Layers

Alt text Alt text Alt text Alt text Alt text Alt text Alt text Alt text

You can open up a usdview from inside NXT by running the usdview node. Please insure you are running the correct path to your file.

Alt text

Then simple execute from selected:

Alt text

Alt text

Alt text