reference paths from list of primitive paths
656 4 1- Orsonorix
- Member
- 25 posts
- Joined: April 2015
- Offline
- mtucker
- Staff
- 4523 posts
- Joined: July 2005
- Offline
- Orsonorix
- Member
- 25 posts
- Joined: April 2015
- Offline
Lets say I'm defining scene structure like in this example and I want to use this defined structure as path references in different nodes, same way as in sop you can create channel reference. That would make sure i can change name in scene structure and auto update it elsewhere since as I understand there are no dynamic links in usd. I'm starting with usd and solaris so I'm not sure if this kind of channel referencing is necessary, but I feel like this would reduce possible errors in paths.
- mtucker
- Staff
- 4523 posts
- Joined: July 2005
- Offline
Yes, we use `chs` expressions in prim path parameters all the time when building HDAs, and setting up demo files. It's extremely handy. The `loplastmodifiedprim` and `loplastmodifiedprims` expressions can also be very useful as a way of affecting all prims affected by some other node (without having to now the exact parameter name(s) on the source node). The `lopinputprim` and `lopinputprims` expressions you see popping up as the default values for a lot of LOP nodes are just specialized versions of `loplastmodifiedprim(s)` that look at a node connected to the input of the current node.
- tamte
- Member
- 8785 posts
- Joined: July 2007
- Offline
for your case you can use strsplit() HScript function to get a single line of the primpath parm
I assumed using "\n" as a separator per new line would work, but in my test I had to use the actual newline
I assumed using "\n" as a separator per new line would work, but in my test I had to use the actual newline
`strsplit(chs("../primitive1/primpath"), " ", 0)`
`strsplit(chs("../primitive1/primpath"), " ", 1)`
`strsplit(chs("../primitive1/primpath"), " ", 2)`
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links