B.Walters Posted June 8, 2007 Share Posted June 8, 2007 Does anybody know how I can add my own script to the menu you get when you right-click a node? I've seen it done before... I just haven't been able to figure out how. Quote Link to comment Share on other sites More sharing options...
AdamJ Posted June 8, 2007 Share Posted June 8, 2007 Look for this file $HOUDINI_PATH/houdini/OPmenu Does anybody know how I can add my own script to the menu you get when you right-click a node?I've seen it done before... I just haven't been able to figure out how. Quote Link to comment Share on other sites More sharing options...
B.Walters Posted June 8, 2007 Author Share Posted June 8, 2007 Just as I was coming back to post "Nevermind, I found it!"... But thanks Adam! Quote Link to comment Share on other sites More sharing options...
sanostol Posted January 10, 2011 Share Posted January 10, 2011 jsut a quick questionk, is it possible to link to a python script instead of a cmd. I tried, but without success Quote Link to comment Share on other sites More sharing options...
com48 Posted January 10, 2011 Share Posted January 10, 2011 jsut a quick questionk, is it possible to link to a python script instead of a cmd. I tried, but without success No. sadly thats not possible currently. cmd that calls your python is the only way for now. Quote Link to comment Share on other sites More sharing options...
graham Posted January 10, 2011 Share Posted January 10, 2011 (edited) It is possible to use a Python script from OPmenu with a little trickery. The following is an example for performing an action on a digital asset from a class I taught at SESI LA over the summer. The hscript file it calls just executes a python -c call that imports and reloads a module, then calls a function from it passing in the node path. OPmenu entry: 'Expr: execute("otgetotl -b $opmenu_optype")' debugOTL "Debug OTL" debug.hsc debus.hsc: set script = $arg0 set node = $arg1 python -c "import opmenu_wrapper; reload(opmenu_wrapper); opmenu_wrapper.debug('$node');" Hopefully one day OPmenu will be replaced by an easy to use xml system just like the main menus and parameter versions. Edited January 10, 2011 by graham Quote Link to comment Share on other sites More sharing options...
rdg Posted January 10, 2011 Share Posted January 10, 2011 I used a wrapper like Graham describes that pops up a small hou.ui.selectFromList. The wrapper collected various python scripts depending on the node type via a simple plugin system. Quote Link to comment Share on other sites More sharing options...
sanostol Posted January 12, 2011 Share Posted January 12, 2011 thanks a lot for the hint 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.