Is there a way that I can select a few prims by comparing its attribtues, say "translate", and put the ones higher than X under a new transform. Not sure how to do this procedurally and whether it's achievable with VEX.
How to modify USD hierarchy procedurally694 3 0
USD does not support "moving" prims in the composed scene graph hierarchy. You _can_ move prims on a specific layer using lower-level SDF APIs, which are only accessible through the Python LOP. And in fact this is what the "Restructure Scene Graph" LOP does. Dive in and look at the edit_operations LOP inside there to see how it works (or just use this LOP as-is).
Comparing attribute values is not something natively supported by Houdini's primitive patterns. But you can write a VEX node that does whatever complex calculations/comparisons you want, and have it author a collection into the USD stage. Then you can use a primitive pattern to access the contents of that collection.
- Quick Links