Let's start with this little scene example. I did a pack primitives on 3 objects at /obj/ level and when I'm SOPimporting them, I get this scene graph tree :

I don't really like the automatic path that has been done here : /myAsset_instGeo/op_/obj/myAsset. I would prefer to have this layout :

So, for now, I've been experimenting 3 ways in order to solve this :
1 - By creating, beforehand, a string attribute that…. :


… will be used by the sopImport through the Path Attributes parameter :

2 - Following the example that I saw on that extremely cool scene done by Yuquing Chen [www.sidefx.com] (if I'm not mistaken), which is using reference nodes.

3 - By using the stagemanager node and moving/deleting things manually
—-
I'm cool with the 1st solution. I just find it a little bit not so straightforward. The 2nd solution seems hacky to me, for my use case, and is not procedural. The 3rd one is handy for the artist, but can be “dangerous” and looks hard to automate (I didn't try, though).
Which makes me ask this :
Did I miss a node that can do this in a clean, simple and procedural way ? Like a search and replace for prim paths that can support the usual expressions and wildcards.
I wouldn't be against a python snippet as well ^^. I'm a “python hobbyist” and I'm always failing at navigating into those kind of c++ api documentation [graphics.pixar.com].. haha
Cheers