magneto Posted August 28, 2012 Share Posted August 28, 2012 Hi, I find the opinputpath to be a little long to use while prototyping ideas quickly. Is there a short hand syntax like point(".", 0, "P", 0) to refer to the incoming geometry/node? Thanks Quote Link to comment Share on other sites More sharing options...
Annon Posted August 28, 2012 Share Posted August 28, 2012 (edited) http://www.sidefx.com/docs/houdini12.0/expressions/_custom Make your own. We used to have a shorthand. opin(0) opin(1) etc. But as a "houdini master" you should be able to type 'opinputpath(".", 0)' in half a second flat, with your hands tied behind your back and heavily sedated.. Edited August 28, 2012 by ChristianW Quote Link to comment Share on other sites More sharing options...
magneto Posted August 28, 2012 Author Share Posted August 28, 2012 I know I could do a custom expression but then it creates a problem to distribute them, right? Like if you send the scene to someone else, they will also need to have your expressions. Typing it once is fine but when I need it for multiple nodes, I get lazy Quote Link to comment Share on other sites More sharing options...
Annon Posted August 28, 2012 Share Posted August 28, 2012 I don't see it as that hard to type out opinputpath(".", 0), just use that if you're worried about distributing hip files... Quote Link to comment Share on other sites More sharing options...
magneto Posted August 28, 2012 Author Share Posted August 28, 2012 It's not about whether it's hard or not. It's also not hard to type "hou.pwd().hdaModule()", but they provide a shortcut for it as "hou.phm()". It's just to make common patterns easier. Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted August 28, 2012 Share Posted August 28, 2012 (edited) I find the opinputpath to be a little long to use while prototyping ideas quickly. Is there a short hand syntax like point(".", 0, "P", 0) to refer to the incoming geometry/node? SideFX agrees that writing long function names is time consuming. That's why they added aliases. From the Edit menu select "Aliases and Variables". The first tab, "Aliases" allows you to define an alternate name for hscript commands. So you could shorten "opinputpath" to "opi", and you could shorten "point" to "p". That would allow you to type p(opi(".",0),0,"P",0) You can also add your own pnt() expression that would run point(opinputpath(".", 0), $PT, "P", 0) The aliases and expressions are stored in hou.Session, a Python module that is saved with the HIP file. So there is no problem sharing the HIP file with other people. You can also store Python functions and classes in the current session. For example you could add hou.session.foobar() and use it in Python expressions for parameters. To edit the Python source code for the current session. Select "Windows" then "Python Source Editor" from the menu. In the popup Python editor make sure "hou.session module" is selected as the source file drop down option. All of this is saved in the current HIP file. Allowing you to quickly prototype, etc.. etc.. You can also save a HIP file in the Houdini folder (somewhere under some kind of name), and every time you start a new scene you can get a default set of session stuff preset. Edited August 28, 2012 by hopbin9 2 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 29, 2012 Author Share Posted August 29, 2012 Thanks hopbin, that's a good method I can use at least when prototyping. 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.