nested string expression syntax

   8851   4   2
User Avatar
Member
77 posts
Joined: July 2006
Offline
I'm trying to get two parts of this expression to evaluate, with no luck.

chs(“`opinputpath(”.“,0)`/del_face”)

The opinputpath evaluates correctly, but when I try to evaluate this by adding backticks around it:

`chs(“`opinputpath(”.“,0)`/del_face”)`

..it goes wonky. I've checked the docs on quoting and embedding expressions, but there didn't seem to be anything on nested evaluations.
User Avatar
Member
77 posts
Joined: July 2006
Offline
After fumbling around a bit I stumbled on this solution:

`chs(strcat(opinputpath(“.”,0),“/del_face”))`

It evaluates just fine in as a string expression.
User Avatar
Member
339 posts
Joined: Aug. 2007
Offline
if you don't wanna mess with another nest this should work too
`chs(opinputpath(“.”,0)+“/del_face”)`
Jesse Erickson
Fx Animator
WDAS
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Or for the terminally insane and to bring string concatenation to it's final end in an hscript expression, you could do this too:

`chs(opinputpath(“.”,0)+“/”+“d”+“e”+“l”+“_”+“f”+“a”+“c”+“e”)`
There's at least one school like the old school!
User Avatar
Member
77 posts
Joined: July 2006
Offline
Thanks for the suggestion!

I was getting stuck on the nested functions, and thinking I needed to evaluate each one separately for some odd reason.
  • Quick Links