Jump to content

some UI scripting questions


Houdini7

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!

Link to comment
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)

 

Link to comment
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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...