I noticed if I use the Commands extension, and create a Ground Plane, I get something like this as a Session Id.
anon:0000026AA88A0390:World0.usd
omni.kit.commands.execute(‘AddGroundPlaneCommand’, stage=Usd.Stage.Open(rootLayer=Sdf.Find(‘anon:0000026AA88A0390:World0.usd’), sessionLayer=Sdf.Find(‘anon:0000026AA88A0480:World0-session.usda’)),
planePath=‘/GroundPlane’,
axis=‘Y’,
size=2500.0,
position=Gf.Vec3f(0.0, 0.0, 0.0),
color=Gf.Vec3f(0.5, 0.5, 0.5))
If I then create a new project, do the same thing, I get a new session Id.
anon:000002768BE1B740:World1-session.usda
omni.kit.commands.execute(‘AddGroundPlaneCommand’,
stage=Usd.Stage.Open(rootLayer=Sdf.Find(‘anon:000002768BE1C0A0:World1.usd’), sessionLayer=Sdf.Find(‘anon:000002768BE1B740:World1-session.usda’)),
planePath=‘/GroundPlane’,
axis=‘Y’,
size=2500.0,
position=Gf.Vec3f(0.0, 0.0, 0.0),
color=Gf.Vec3f(0.5, 0.5, 0.5))
So the code to create a ground plane won’t work in an extension because the session Id is different every project.
Is there either a way to find this Id, or create a ground plane and add a material without knowing the session Id?
Thank you,