RickWork Posted August 17, 2005 Share Posted August 17, 2005 Hello, So I'm working on some otls and am having some problems with paths..... As a test I have the following network structure: SphereSOP->TransforrmSOP1->TransformSOP2 For TransformSOP1 I have the tx parameter set to 2. On the TransformSOP2 I have tried the following to extract TransformSOP1's tx value: ch(`opinput(".", 0)`"/tx") ch(opinput(".", 0)"/tx") ch(`opinput(".", 0)`+ "/tx") ch(opinput(".", 0)"+ /tx") In the long run, I'm just trying to avoid hardcoding the full path to SOPs in my expressions because I naturally get errors when I try to make an otl. I did also try oppwf() but still at a loss when to backtick, when not to backtick, how to concatenate, etc. Any tips is much welcome! Cheers, Rick Quote Link to comment Share on other sites More sharing options...
thomas.waldinger Posted August 17, 2005 Share Posted August 17, 2005 try ch("../" + opinput(".", 0)+"/tx") works for me. Quote Link to comment Share on other sites More sharing options...
RickWork Posted August 17, 2005 Author Share Posted August 17, 2005 try ch("../" + opinput(".", 0)+"/tx") works for me. 20632[/snapback] ahh very good thanks! Quote Link to comment Share on other sites More sharing options...
edward Posted August 17, 2005 Share Posted August 17, 2005 I think using opinputpath(".", 0) will also work. Quote Link to comment Share on other sites More sharing options...
RickWork Posted August 17, 2005 Author Share Posted August 17, 2005 I think using opinputpath(".", 0) will also work. 20634[/snapback] so backticks are not needed I see. So when would i use a backick? textport only? Quote Link to comment Share on other sites More sharing options...
edward Posted August 17, 2005 Share Posted August 17, 2005 In Houdini, there are two distinct languages (I *think* mostly due to legacy reasons from PRISMS). It's sort of like: 1. "hscript, the command language": the stuff found in the help command and what you type in the textport 2. "hscript, the expression language": the stuff found in exhelp and what you type in animatible parameters So from (1), we use backticks to access (2). That's why in the textport, you need backticks for all stuff associated with exhelp. From (2), we can use the run() expression function to access (1). In your specific example, you were in (2) trying to access (2) and so no backticks were required. I guess a rule of thumb then is that you use backticks when passing the result of something found in exhelp to a command found in help. Quote Link to comment Share on other sites More sharing options...
Jason Posted August 17, 2005 Share Posted August 17, 2005 so backticks are not needed I see. So when would i use a backick? textport only? 20639[/snapback] Backticks are only needed for string fields. In numerical fields putting a backtick will return 0 always (which the return value of the evaluation - useless). I get this wrong almost every day but I remember almost every day too. Quote Link to comment Share on other sites More sharing options...
edward Posted August 17, 2005 Share Posted August 17, 2005 Ah yes, I forgot about string parameters. I guess more generally, backticks are used to get into the (2) world when you're outside. Quote Link to comment Share on other sites More sharing options...
RickWork Posted August 18, 2005 Author Share Posted August 18, 2005 Ah yes, I forgot about string parameters. I guess more generally, backticks are used to get into the (2) world when you're outside. 20643[/snapback] Yup good info guys. I get it now. It now makes sense why my otls weren't working as I expected. Cheers, Rick 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.