https://www.sidefx.com/docs/houdini/vex/functions/chsop.html [www.sidefx.com]
"Evaluates an operator path parameter and return the path to the operator."
I expecting that if I pass "/obj/geo1/box1/scale" to it, to get in return, "/obj/geo1/box1" but instead I get the value of the parameter "1". Is this a docs problem or am I missing something?
Thanks
VEX chsop, return node path?
1416 3 0- probiner
- Member
- 340 posts
- Joined: June 2013
- Online
- tamte
- Member
- 8622 posts
- Joined: July 2007
- Offline
chsop() VEX is similar to chsop() expression which has much better worded explanation
https://www.sidefx.com/docs/houdini/expressions/chsop.html [www.sidefx.com]
so essentially, it evaluates string (or operator path) parameter and expects to find a path to the operator
it will turn it to full path string
I wouldn't guarantee that it's exactly the same, but without thinking about it too much the use roughly seems the same to me
https://www.sidefx.com/docs/houdini/expressions/chsop.html [www.sidefx.com]
so essentially, it evaluates string (or operator path) parameter and expects to find a path to the operator
it will turn it to full path string
chsop("parm")
is sort of like opfullpath(ch("parm"))
I wouldn't guarantee that it's exactly the same, but without thinking about it too much the use roughly seems the same to me
Edited by tamte - Sept. 20, 2021 12:12:49
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- probiner
- Member
- 340 posts
- Joined: June 2013
- Online
tamte
chsop() VEX is similar to chsop() expression which has much better worded explanation
https://www.sidefx.com/docs/houdini/expressions/chsop.html [www.sidefx.com]
so essentially, it evaluates string (or operator path) parameter and expects to find a path to the operator
it will turn it to full path stringchsop("parm")
is sort of likeopfullpath(ch("parm"))
I wouldn't guarantee that it's exactly the same, but without thinking about it too much the use roughly seems the same to me
I see now, so what I was trying to get out of it doesn't make sense. Although to add to your info, while opfullpath() won't return the full path of a parm reference in a string parm with "../box1/scale", chsop() will return the fullpath "/obj/geo1/box1/scale"
Cheers
- tamte
- Member
- 8622 posts
- Joined: July 2007
- Offline
probinerDid you try opfullparh(ch()) though? as that's what you need to do to evaluate the parm value first so that it returns "../boxes/scale" for opfullpath to convert for the same result as with chsop() alone
Although to add to your info, while opfullpath() won't return the full path of a parm reference in a string parm with "../box1/scale", chsop() will return the fullpath "/obj/geo1/box1/scale"
Edited by tamte - Sept. 21, 2021 16:52:16
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links