Jump to content

Replacing and storing attributes based on user input inside an Houdini Digital Asset

Recommended Posts


I am trying to make a wall generator. A wall is divided into segments and each segment has a @windowType attribute which decides what type of window will be displayed on the wallsegment. 
The user interface will work as follows. The user has access to 2 sliders: one to select a wallsegment on which the changes will apply and a 'select new type of window' - slider, which allows the user to pick out of 5 presets. The chosen preset will be displayed on the wallsegment.

The way I got this to work was by declaring an if-statement stating:

if(wallselected == @primnum)


     @windowpreset = chi('selectNewTypeOfWindow)';


This works. But a problem occurs. When I want to select another wallsegment that I want to  change, the new preset jumps to the newly selected wallsegment, which means that the previous wallsegment (it's @windowType attribute that is) remains unchanged compared to before.
Is there a way to make sure that the preset of a wallsegment remains changed, even when the if-statement isn't applicable anymore?

I hope this is somewhat understandable. Thank you for looking into this.


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