I`ve also tried with python but apparently the get children function doesn`t exist ?
importpxrimporthoustage=hou.pwd().editableStage()root_prim=stage.GetPrimAtPath("/")# Loop through all child prims under the root primforchild_priminroot_prim.getChildren():# Check if the child prim is a component and perform actionifchild_prim.getTypeName()=="Xform"andchild_prim.getPurpose()=="component":print(child_prim.GetName())
Before answering the detailed questions here, I want to take a step back and ask what you're trying to achieve. I just want to make sure we give you useful answers/information.
Im trying to move geo/* to example/geo/ with keeping the geo configured the way it is configured at example/geo in a wrangle or if not possible in a python scipt.
Ah, I see. Shuffling USD prims around like that isn't really possible this way. The best we have to offer at present are the Stage Manager and the Graft Branches LOPs.
There is also the Restructure Scene Graph LOP [www.sidefx.com] that can do some measure of restructuring (reparenting, renaming, removing). It requires sub-layer flattening of the inputs, but is another option to keep in mind for these sorts of cases.
Not sure if I'm asking the same question as above, but I'm trying to use the restructure scene graph node to tidy up an older usd stage that I have without having to go back to the original graph and re-author everything. Unfortunately I'm running into an issue when reparenting some instancable prims and their respective prototype prim. When I reparent the instances, they retain their reference path, but when I move the prototype as expected this breaks the instances. Is there any way to change that path with vex after reparenting or is it a python thing?