breadbox Posted July 29, 2013 Share Posted July 29, 2013 I'm looking to have a button in the UI update a slider. I want the button to query the number of incoming points and set the slider to that value. there is an hscript in the button but in not sure what the code should be? I can't figure out how to access the number of points in an object through the hscript and set the value for the slider. I am trying to use: npoints(node_name) which might be getting the value, but how would I set the slider to update once the button is clicked. would be something like setAttr in maya? something with hou.node.parms? Ideally it would reference itself so that if the node was duplicated it would instance without problem. here is my test file getMaxPoints - Copy.hipnc Quote Link to comment Share on other sites More sharing options...
edward Posted July 29, 2013 Share Posted July 29, 2013 In hscript, it would be something like this: opparm . parm_name ( `npoints(opinputpath(".", 0))` ) Quote Link to comment Share on other sites More sharing options...
breadbox Posted July 29, 2013 Author Share Posted July 29, 2013 works perfect! 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.