sanostol Posted February 14, 2010 Share Posted February 14, 2010 Hi, I want to add custom scripts to the PARMmenu, so I can for add custom tools for parameters on rightclick, but I can not find any docs about it. I want to add actionItem "Plot", but I think I need help here thanks Martin Quote Link to comment Share on other sites More sharing options...
edward Posted February 17, 2010 Share Posted February 17, 2010 As sort of noted in PARMmenu.xml, take a look at MainMenuMaster The format and how it works is pretty much the same. Hopefully that clears things up a bit. Quote Link to comment Share on other sites More sharing options...
sanostol Posted February 17, 2010 Author Share Posted February 17, 2010 thanks alot , it works, but it leads directly to the next question. any python script leads to an houdini errormessage, blaming for syntax error. even import hou results in this error are there any examples available for this. it seems a little but "underdocumented" As sort of noted in PARMmenu.xml, take a look at MainMenuMaster The format and how it works is pretty much the same. Hopefully that clears things up a bit. Quote Link to comment Share on other sites More sharing options...
sanostol Posted February 17, 2010 Author Share Posted February 17, 2010 i'm doing a workaround now, maybe someone can use it.. instead of adding a scriptitem I add a scriptCode to the PARMmenu.xml file. that imports just a module from my pythonpath and runs a method from that. <scriptCode> import houdini.mm_utils houdini.mm_utils.plot_anim(kwargs['parms']) </scriptCode> but still the other way would be interesting, too Quote Link to comment Share on other sites More sharing options...
edward Posted February 18, 2010 Share Posted February 18, 2010 A scriptCode tag can only go into a scriptItem tag. I forgot to also point out MotionEffectsMenu.xml that you should take a look at. From there, it uses choptoolutils a lot which can be found in $HH/scripts/python Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted May 9, 2014 Share Posted May 9, 2014 A little off-topic, since I need to parse XML file myself for HDK right now, I looked at some free libraries to do this, but since Houdini uses XML files the simple question grown in my head: - is there a XML parser available in HDK or should I use external library? Quote Link to comment Share on other sites More sharing options...
graham Posted May 9, 2014 Share Posted May 9, 2014 Have a look at the UT_XML* classes in the HDK. Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted May 9, 2014 Share Posted May 9, 2014 Oh yeah. That's what I needed. Thanks. 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.