Jump to content
Sign in to follow this  
Houdini7

some UI scripting questions

Recommended Posts

Hello,

 

I want to build an UI plugin for houdini. Can you help me with some things:

  1. how do I change a parameter of the selected node in the parameter window programatically (for example parameter distance of the extrude node)? There must be a setter function which gets the specific path to the parameter and sets the parameter I guess?!
  2. get the parameter edit box under the position of the mouse (if one navigates to an edit box) or the unique path of the parameter under the mouse?
  3. set a global mouse hook (global in the sense that it gets all events of the houdini main UI)?

 

Would be cool if someone could name some python objects which will help me. Preferable python+pyside. Thanks!

Share this post


Link to post
Share on other sites
On 24.5.2020 at 2:38 PM, Houdini7 said:

how do I change a parameter of the selected node in the parameter window programatically (for example parameter distance of the extrude node)? There must be a setter function which gets the specific path to the parameter and sets the parameter I guess?!

I dont know what you mean with programatically - but do you mean, how you can talk with python to the distance parameter in Extrude SOP?

You mean something like this?

def extrude_dist(dist):
    set_dist = hou.parm('/obj/Create_Project/polyextrude1/dist').set(dist)
    return(set_dist)
    
distance = 7
extrude_dist(distance)

 

Share this post


Link to post
Share on other sites

There exist two Expression functions mousepane and mousepath. How can these be used within python? The functionality should be covered in hou.PathBasedPaneTab. But I cannot find any corresponding function. My goal is to get the parameter (in parameter editor) under the mouse pointer.

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
Sign in to follow this  

×