Python Buttons

   2336   0   0
User Avatar
Member
665 posts
Joined: July 2005
Offline
I'm trying to create a Button to be added to SHOPs via the RMB menu. This is a generic button to help SHOPs better integrate with the pipeline here.

The button that is created will run a python script on a corresponding ROP to add the AOVs of the current SHOP. Unfortunately,, I am running into a real headache of problems.

Currently, it seems the only to have a Button run a python script in it's call back is to actually wrap the python script in an hscript ( I need to both import the script and reload the script within the button )

And the only way to add a callback seems to be to use the addButtonTemplate() bit. Which I can't seem to get an hscript call back into as everytime I add a space (ie “message HI”) this breaks the format need for hscript to pass something into the ‘python’ command, which is the only way I can find to use the RMB menu on a node.

I'm a bit at a loss here. It seems there should be an easier way to add a generic button to OPs but for the life of me, I just can't get it right now. Suggestions?


thanks!
-j
  • Quick Links