pasto Posted February 21, 2018 Share Posted February 21, 2018 Hello, I am trying to get the resolution of some cop images to drive the size of a bunch of grids. I used this expression : ch("../../../img/comp1/default_pic_`opdigits(".")`/size1")/200 I use opdigits to iterate through several cop files without having to update the link manually. The opdigits expression works when set alone but I can't add it in a ch() expression even between backticks. I get a extra tokens error. Is there any solution to this ? is it a ch() limitation ? Thx for your help. Quote Link to comment Share on other sites More sharing options...
woodenduck Posted February 21, 2018 Share Posted February 21, 2018 (edited) Try separating with "" and + so your expression would become... ch("../../../img/comp1/default_pic_"+opdigits(".")+"/size1")/200 Edited February 21, 2018 by woodenduck Removed backticks. Not required Quote Link to comment Share on other sites More sharing options...
pasto Posted February 22, 2018 Author Share Posted February 22, 2018 Thanks a lot Joe, works perfectly. Never heard of that "+ form before, is it the "stronger" version of backticks in Hscript ??! Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted February 22, 2018 Share Posted February 22, 2018 This may be some good reading for you: http://www.sidefx.com/docs/houdini/network/expressions.html#string-parameters Backticks are for the outside evaluation of string values. Funny enough it does not mention the " + " for internal expressions. Quote Link to comment Share on other sites More sharing options...
pasto Posted February 22, 2018 Author Share Posted February 22, 2018 Thanx Ben, indeed, never seen that in the billions tutorials I followed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.