Jump to content
Justin K

See Code For Shelf Tool?

Recommended Posts

Hey,

 

Is there a way to see the actual code for any of the shelf tools?  The bones from curve is the one I am after.  I would like to write a tool that allows for the generation of multiple bones from a series of curves--as opposed to one bone chain from one curve.  As I am trying to extend functionality not reinvent the wheel I figured a great place to start would be this:  seeing how the current tool is written.  Then again, maybe this is a really ignorant question.  :huh:.  Ive been rummaging around the preferences folders looking for shelf tools in file format but am coming up short--granted I am on a mac....

 

Thanks in advance!

 

 

 

 

 

Share this post


Link to post
Share on other sites

I think most are written in Python but Hscript is supported as well.

 

If you right-click on a shelf tool, then click "Edit Tool..." it will allow you to see how the code that the tool is calling.  This code is found under the script tab.

Share this post


Link to post
Share on other sites

Thanks John,

I actually did get that far.  

However the only snippet of code in there was this:

 

import objecttoolutils

objecttoolutils.customStateTool(kwargs, 'bonesfromcurve')

 

which means there is something else going on below the hood.  

Edited by Justin K

Share this post


Link to post
Share on other sites

Those modules exist in $HFS/houdini/python2.7libs/

So if your on a mac you can do 

open -t $HFS/houdini/python2.7libs/objecttoolutils.py

in the shell to check out what's going on with the customStateTool function.

  • Like 2

Share this post


Link to post
Share on other sites
13 hours ago, jkunz07 said:

Those modules exist in $HFS/houdini/python2.7libs/

So if your on a mac you can do 


open -t $HFS/houdini/python2.7libs/objecttoolutils.py

in the shell to check out what's going on with the customStateTool function.

Thanks for that!

 

Share this post


Link to post
Share on other sites

Of course!

I should have mentioned that the use of $HFS assumes you have the Houdini environment setup in the shell or have launched Houdini Terminal inside the Utilities folder of the app directory.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×