State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:4.5v2|BugID:499328|
from fnpxr import Usd, UsdGeom, Gf#https://github.com/PixarAnimationStudios/USD/wiki/PointInstancer-Object-Modelstage = Usd.Stage.CreateInMemory()instancer = UsdGeom.PointInstancer.Define(stage, "/root/points")xformPrim = UsdGeom.Xform.Define(stage, "/root/points/two_items")cubeGeo = UsdGeom.Cube.Define(stage, "/root/points/two_items/cube")sphereGeo = UsdGeom.Sphere.Define(stage, "/root/points/two_items/sphere")instancer.CreatePrototypesRel().SetTargets([xformPrim.GetPath()])positions = [Gf.Vec3f(5,0,0), Gf.Vec3f(10,0,0)]indices = [0,0]instancer.CreatePositionsAttr(positions)instancer.CreateProtoIndicesAttr(indices)instancer.CreateIdsAttr([0,0,0])print(stage.ExportToString())stage.Export("/tmp/instances.usda")
2) Create a UsdIn node and set the fileName parameter to "/tmp/instances.usda".

stage = Usd.Stage.CreateInMemory()instancer = UsdGeom.PointInstancer.Define(stage, "/root/points")xformPrim = UsdGeom.Xform.Define(stage, "/root/geo/two_items")cubeGeo = UsdGeom.Cube.Define(stage, "/root/geo/two_items/cube")sphereGeo = UsdGeom.Sphere.Define(stage, "/root/geo/two_items/sphere")instancer.CreatePrototypesRel().SetTargets([xformPrim.GetPath()])
2) Add an additional nested location for the Xform prim:
stage = Usd.Stage.CreateInMemory()instancer = UsdGeom.PointInstancer.Define(stage, "/root/points")xformPrim = UsdGeom.Xform.Define(stage, "/root/points/foo/two_items")cubeGeo = UsdGeom.Cube.Define(stage, "/root/points/foo/two_items/cube")sphereGeo = UsdGeom.Sphere.Define(stage, "/root/points/foo/two_items/sphere")instancer.CreatePrototypesRel().SetTargets([xformPrim.GetPath()]) We're sorry to hear that
Please tell us why