Skip to content

novaphy.UsdPrim

Parsed USD prim entry inside a UsdStageData. Each prim mixes the stage hierarchy (path, parent_path, type_name) with the physical properties pulled out of the standard UsdPhysics schemas, plus any animation tracks attached to its translate / rotate attributes.

Attributes

Attribute Description
path USD prim path ("/World/robot/base").
name Prim leaf name.
type_name USD prim type ("Xform", "Cube", "Sphere", "Mesh", ...).
parent_path Path of the parent prim. Empty string for </>.
local_transform Transform relative to the parent prim.
mass Mass [kg] from UsdPhysics.MassAPI. 0.0 when not authored.
density Density [kg/m³] from UsdPhysics.MassAPI. 0.0 when not authored.
material_binding Path to the bound UsdPhysics.MaterialAPI prim, or empty.
box_half_extents Box half-extents when type_name == "Cube" (or a typed box shape API was applied).
sphere_radius Sphere radius [m] when type_name == "Sphere".
tracks List of UsdAnimationTrack entries — one per animated attribute.

Example

import novaphy

stage = novaphy.OpenUsdImporter().import_file("scene.usda")
for prim in stage.prims:
    if prim.type_name == "Cube":
        print(prim.path, "half-extents", prim.box_half_extents,
              "mass", prim.mass)

Notes

  • Only the geometry-specific fields that match type_name are populated.
  • Animation values are stored in a typed list on each prim (vec3 for translate, vec4 for rotate quaternions); see UsdAnimationTrack.
  • Custom schema attributes (e.g. PhysX-specific) are not surfaced today; reach into the underlying USD layer if you need them.

See Also