Skip to content

Instantly share code, notes, and snippets.

@rhaleblian
Last active October 4, 2020 17:20
Show Gist options
  • Save rhaleblian/00ebc0e8108e885bb3171b11177ba4e9 to your computer and use it in GitHub Desktop.
Save rhaleblian/00ebc0e8108e885bb3171b11177ba4e9 to your computer and use it in GitHub Desktop.
Given a USD instancer, bake in extents using extents at time 0.
stage = Usd.Stage.Open(sys.argv[1])
pprint.pprint([p.GetPrimPath() for p in stage.Traverse()])
p = stage.GetPrimAtPath(Sdf.Path('/bundle/instancer'))
i = UsdGeom.PointInstancer(p)
i.GetExtentAttr().Set(i.ComputeExtentAtTime(0,0))
stage.Save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment