Jump to content

How could you the slider value of an ch("input") if you want to update it


Recommended Posts

There must be an easy solution to this.  I have a wrangle node running over detail mode that includes a bunch of math creating points to draw an ellipse lets say.  I created a channel ch("e") where I read in the eccentricity value and use that in my vex equations.  However, I'm also reading in point positions from an add sop that connects to the first input.  You can edit the point position using the add sop if you want, and that will effect the shape of the ellipse.  So, if the user doesn't move one of the points, then I want to use the ch("e") input at it's currently set value to draw the ellipse.  Changing the "e" value changes the ellipse according to vex... and I subsequently modify the point positions to reflect a change in "e".... all good.    So here is what I'm trying to figure out - If any of the points change and I detect it (by storing it's last position in a detail attribute and comparing), then I need my equation to use the new point positions because the user is moving points to draw the ellipse, and I then solve for the variable e using my equations instead.  But I want to update the slider with the calculated e position to reflect a change to the system (from editing points).   I don't wan to just internally use the calculated "e" value but want to update the input slider to reflect the current state of the system.   The user always has the option of moving points, or moving the ch('e') slider, either way the ellipse equation is drawn to pass through those points correctly.   How do you handle the situation where sometimes you want to use a slider input, but sometimes you want to set it to some known value so the UI updated.   There must be some bi-directionality, or is there another scheme used for this situation?  

Link to comment
Share on other sites

I haven't had the need to enter the world of python in Houdini yet.  I'm prototyping user interaction and and I don't know where the limits are of what you can build inside Houdini. 

Thanks Tomas for pointing out where I should be looking to make something like this.  

Edited by opcode
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.

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...