Jump to content

Dynamic interface parameters


Recommended Posts


i'm new on Houdini, and i'm trying to create my own tools.
My question is about the parameters interface.
I would like to know if it's possible to create dynamic folders and parameters, depending on group numbers for example.

Here is a screenshot of my nodes.



I'm starting with a simple grid node with 2 rows & columns in polygon.
The first "foreach" is cutting my mesh in several pieces (from the center, that's why there are 2 "knife" nodes, one is cutting from middle to end, and the other one from middle to start)
Then, i'm using a "facet" to split primitives, and the "sort" is set to "By X" to get ascending numbers.
The connectivity let me create a group with connected points and the "partition" creates groups based on primitives number.
So: if i'm changing the subdivisions of my planes, it will create as many groups as primitives.
The last "foreach" assigns random colors on each primitive, and the transform node change de pivot of each face in order to rotate them.

Now, my question would be :
can we create an interface, depending on the groups number ?
My goal is to control independently the rotation of each primitive.
So, in my interface, if I have 10 subdivisions, i'll have 10 groups and 10 sliders controling the rotation independently.
And if I change the number of divisions, the number of sliders would update dynamically.
I don't know if it requires scripts functions or if there is another way...

thanks for help/


Link to comment
Share on other sites

i don't think you can really do it automatically, but you could add a button to scan your data and create new spare parms that could be queried inside of a foreach loop.  you MIGHT be able to do it automatically, but that could be dangerous -- like if you disconnect your input it might delete all the spares and thus dump any values you've set.

Link to comment
Share on other sites

Without scripting, something like this will work:

argc(primgroupmask(path, "group*"))

But as was stated, it resets parameter values at each update (on my build, I also need to delete and undo, to update it properly). Maybe, it is better to reverse asset logic and drive something with the number of multiparm instances, rather than reference it from inside.

Link to comment
Share on other sites

I'd advise using the methods suggested by f1480187, of creating divisions based on a multi parm value.
But think careful about creating control for each individual plane. It might work and look Ok for a small number of planes but as the number of planes increase it might not work that well any more as the interface will become longer and more complex with each plane added. With to many parm it gets harder to keep track what each one does.

Better might be to either randomize the rotation of each plane automatically or group random planes together so the interface remains usable.

Link to comment
Share on other sites

thanks for the advice ! I think you're right, i'll create a random rotation, and i'll use a group by range to create some pivot variations. This is actually for a windows-creator...

But I think i'll try what f1480187 said. Could be usefull in some limited cases


Thanks !

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