What are my node-based options for manipulating the scenegraph via code? Is there a LOPs equivalent to Katana's OpScript node for example, that would allow me to generate/delete/edit primitives in the scene graph?
Would the Python be ok for this?
Noob question: Nodes for editing the scenegraph via code?
2291 4 0- Tim Crowson
- Member
- 240 posts
- Joined: 10月 2014
- Offline
- Tim Crowson
- Member
- 240 posts
- Joined: 10月 2014
- Offline
- jsmack
- Member
- 7850 posts
- Joined: 9月 2011
- Offline
Generally in USD, primitives cannot be renamed or deleted. The stage manger can do this in a way, but it basically creates a new usd and copy's the prims from one stage to another but also flattens the stage.
There are a few options for editing/creating using code.
The python lop uses the usd api directly.
Attribute VOP/Wrangle uses vex. These can be used mostly for editing attributes/primvars or metadata.
The inline lop applies usd layer be entered as text.
There's probably other nodes I'm not thinking of.
There are a few options for editing/creating using code.
The python lop uses the usd api directly.
Attribute VOP/Wrangle uses vex. These can be used mostly for editing attributes/primvars or metadata.
The inline lop applies usd layer be entered as text.
There's probably other nodes I'm not thinking of.
- Tim Crowson
- Member
- 240 posts
- Joined: 10月 2014
- Offline
- mtucker
- スタッフ
- 4458 posts
- Joined: 7月 2005
- Offline
Creating new prims (and probably for creating new attributes on prims) I'd recommend the Python LOP. Having access to the whole USD python API lets you control exactly what gets authored and how. Plus you can use the pxr.Sdf APIs on the editableLayer, which particularly in the case of creating a lot of new USD prims can be _enormously_ faster than using the pxr.Usd APIs.
-
- Quick Links