magneto Posted December 24, 2011 Share Posted December 24, 2011 I find it most of the times when I create new OPs inside the Network View, I have to turn their Display flag manually. Is there a way to have this behavior automatically so whenever I add a new OP to an existing tree, it automatically turns it on? Thanks. Quote Link to comment Share on other sites More sharing options...
daniel.phillis Posted December 25, 2011 Share Posted December 25, 2011 (edited) not sure about that - but i was once in an environment where they set up hotkeys for new artists - so if the artist hit F12 - the SOP called 'OUT' was set to display and the SOP called 'RENDER' -(nulls) was set to render. done with the opset command in HScript ie opset -d on /obj/geo1/null* this could be looped over the whole scene or in a certain context. not sure how the hotkey was linked to the HScript - but im sure its possible. *EDIT* ok - i made a new shelf tool with the opset script in there, made sure the script was set to Hscript instead of pthon - and assigned a hot key to it in the shelf tool options. Edited December 25, 2011 by daniel.phillis Quote Link to comment Share on other sites More sharing options...
graham Posted December 25, 2011 Share Posted December 25, 2011 (edited) At home I personally use an OnInputChanged python event handler that when run, detects if the new connection is with a node who has its display/render flags set. If the node does, it sets the flags on the newly connected node. The code I run is just a call to my nodeutils.py module's changeFlagsOnWiring(): http://houdinitoolbox.com/houdini.php?asset=38 As for changing flags based on names, that's easy enough to do with an OnNameChanged event handler where you just look up the new name into some predetermined table. Edited December 25, 2011 by graham 2 Quote Link to comment Share on other sites More sharing options...
magneto Posted December 25, 2011 Author Share Posted December 25, 2011 Thanks guys. @Graham, what you described is exactly what I need. Thanks for providing source code. Where do you have to put a script like that since it's not inside an OTL? 1 Quote Link to comment Share on other sites More sharing options...
graham Posted December 26, 2011 Share Posted December 26, 2011 You can put the file on the site somewhere like $HOME/houdiniX.Y/scripts/python/, as well as create the file $HOME/houdiniX.Y/scripts/OnInputChanged.py and put the following in that file: import nodeutils node = kwargs["node"] nodeutils.changeFlagsOnWiring(node) 2 Quote Link to comment Share on other sites More sharing options...
magneto Posted December 27, 2011 Author Share Posted December 27, 2011 Thanks Graham, very usefuk info. 1 Quote Link to comment Share on other sites More sharing options...
mirHadi Posted April 15, 2021 Share Posted April 15, 2021 Hello Thank you Graham! I got the toolbox on the GitHub link, and I'm using python 2.7 version. I just wanted to install it through packages and I used "houdini-toolbox.json" provided inside and set the path to the installation directory. It was like : { "path" : "E:/App/Houdini/1. plugins/Houdini-Toolbox-python2.7/houdini", "env": [ { "HOUDINI_TOOLBOX_DIR": "E:/App/Houdini/1. plugins/Houdini-Toolbox-python2.7" }, { "PYTHONPATH":"E:/App/Houdini/1. plugins/Houdini-Toolbox-python2.7/python" } ] } but nothing shows in Houdini (18.5). especially I was searching for "nodeutils.py" to change display flag on wiring as you suggested but couldn't find this script in the installation folder. would you please help to figure this out? thank you again 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.