Search - User list
Full Version: VEX chsop, return node path?
Root » Houdini Indie and Apprentice » VEX chsop, return node path?
probiner
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
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 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
probiner
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 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

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
probiner
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"
Did 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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB