[help] Dynamic UI for HDA
4980 12 3- RodrigoMartin
- Member
- 24 posts
- Joined: Nov. 2019
- Offline
Hello, I am currently trying to do a procedural circle data graph, with one string, color and amount input each segment of the circle graph.
I am trying to do it as clean as possible, so I though if there is a way to make the Houdini UI dynamic, with one int controlling the amount of sections, and show 1 string, float, and color in the UI for each unit in that integer.
Here are a few screenshots of how I imagine it working:
edit: the first int was suposed to change between screeshots, with 3 in the one with 4 folders.
edit2: I found the Tab Hide when, but is there a way to create and destroy by code? I think I can work with this but inside it will not be that clean.
I am trying to do it as clean as possible, so I though if there is a way to make the Houdini UI dynamic, with one int controlling the amount of sections, and show 1 string, float, and color in the UI for each unit in that integer.
Here are a few screenshots of how I imagine it working:
edit: the first int was suposed to change between screeshots, with 3 in the one with 4 folders.
edit2: I found the Tab Hide when, but is there a way to create and destroy by code? I think I can work with this but inside it will not be that clean.
Edited by RodrigoMartin - April 27, 2020 10:59:06
- tamte
- Member
- 8599 posts
- Joined: July 2007
- Offline
- RodrigoMartin
- Member
- 24 posts
- Joined: Nov. 2019
- Offline
- tamte
- Member
- 8599 posts
- Joined: July 2007
- Offline
- RodrigoMartin
- Member
- 24 posts
- Joined: Nov. 2019
- Offline
- vinyvince
- Member
- 255 posts
- Joined: Sept. 2012
- Offline
tamte
to get you startedImage Not Found
Just wondering, what will be your take Tomas, @tamte when you want to access parameters defined dynamically in the HDA interface?
Or how to convert these into a parameter table array on points?
In case for example i want to define multiples layers in the HDA and loop thought then?
Does my word make sense to one of you?
Probably with Python you could do that easily, yeah i should learn it i know, need to find time for
Edited by vinyvince - April 26, 2022 16:08:07
Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
- tamte
- Member
- 8599 posts
- Joined: July 2007
- Offline
vinyvincenormally you either loop through the multiparm using VEX
In case for example i want to define multiples layers in the HDA and loop thought then?
Does my word make sense to one of you?
or in For Loop SOP Block
depending on what tools you need to invoke per iteration
Python is of course an option, but I usually leave it as a last option or when it makes ense
to just convert to arrays then VEX is enough
nowadays you can even use Attribute From Parameters SOP to gather those values and process later
Edited by tamte - April 26, 2022 16:17:17
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- vinyvince
- Member
- 255 posts
- Joined: Sept. 2012
- Offline
Thanks Tomas!
The idea is actually simple. My brain is not yet used to that kind of mechanism i guess
Im using a multipart block list, and that guy should give the path to X cache layer and some parameters like this
Then in the network, im trying to get that value and use it. So far with the following wrangle.
But it fails to import the values, probably something stupid, not sure what i miss.. except some sleep :S
Many Thanks and take care
______________________________________
s@biomelayer;
s@biomethreashold;
for (int index = 0; index < `chs("../values")`; index++)
{
// Import biome layer cache path
string biome_name = "biomecache" + itoa(index+1);
s@biomename = ch("../" + biome_name);
append(@biomelayer, biome_name);
// Import biome layer threashold value
string threashold = "threashold" + itoa(index+1);
float removethreash = ch("../" + threashold);
append(@biomethreashold, threashold);
}
The idea is actually simple. My brain is not yet used to that kind of mechanism i guess
Im using a multipart block list, and that guy should give the path to X cache layer and some parameters like this
Then in the network, im trying to get that value and use it. So far with the following wrangle.
But it fails to import the values, probably something stupid, not sure what i miss.. except some sleep :S
Many Thanks and take care
______________________________________
s@biomelayer;
s@biomethreashold;
for (int index = 0; index < `chs("../values")`; index++)
{
// Import biome layer cache path
string biome_name = "biomecache" + itoa(index+1);
s@biomename = ch("../" + biome_name);
append(@biomelayer, biome_name);
// Import biome layer threashold value
string threashold = "threashold" + itoa(index+1);
float removethreash = ch("../" + threashold);
append(@biomethreashold, threashold);
}
Edited by vinyvince - April 26, 2022 18:45:03
Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
- vinyvince
- Member
- 255 posts
- Joined: Sept. 2012
- Offline
tamteAttribute From Parameters SOP, oh i didn't know this one, but not sure how to filter values, looks more simple in VEX, but can't found my way for now on that simple thing above... Pity me :/
Attribute From Parameters SOP
Edited by vinyvince - April 26, 2022 18:45:58
Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
- vinyvince
- Member
- 255 posts
- Joined: Sept. 2012
- Offline
I think im in a good way to "auto solve" myself. Vex Concat seem to be what i was looking for.
strcat in script
So i build like a data table with point linked to my HDA multipart block list parameters.
One thing im still missing now is how to pass the string attribute, the path to a file cache Sop to import each cache layer, one by one..
All syntax and methods i tried didn't work..
Tried with details attribute or same way i build the data table using concat in such way
s@biome= chs(concat(("../biome_name"),itoa(iter+1)));
but for that filecache sop, houdini filename input doesn't seem to like anything
chs(concat(("../biome_name"),itoa(detail(-1,"iteration",0)+1))
or with ``
Any idea someone please? @tamte
strcat in script
So i build like a data table with point linked to my HDA multipart block list parameters.
One thing im still missing now is how to pass the string attribute, the path to a file cache Sop to import each cache layer, one by one..
All syntax and methods i tried didn't work..
Tried with details attribute or same way i build the data table using concat in such way
s@biome= chs(concat(("../biome_name"),itoa(iter+1)));
but for that filecache sop, houdini filename input doesn't seem to like anything
chs(concat(("../biome_name"),itoa(detail(-1,"iteration",0)+1))
or with ``
Any idea someone please? @tamte
Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
- vinyvince
- Member
- 255 posts
- Joined: Sept. 2012
- Offline
Looks like there is some progress with this
`chs("../file_" + (detail("../meta", "iteration", 0)+1))`
`chs("../file_" + (detail("../meta", "iteration", 0)+1))`
Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
- tamte
- Member
- 8599 posts
- Joined: July 2007
- Offline
you shouldn't need concat for the VEX loop version
this should work:
also to avoid +1 in itoa(index + 1) you can make your Multiparm start at 0 instead of 1
as for the For Loop SOP this should work:
as should this
this should work:
string biome_name = chs("../biome_name" + itoa(index+1));
as for the For Loop SOP this should work:
`chs("../biome_name" + detail(-1, "iteration", 0))`
`chs(strcat("../biome_name", detail(-1, "iteration",0)))`
Edited by tamte - April 27, 2022 11:21:38
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- vinyvince
- Member
- 255 posts
- Joined: Sept. 2012
- Offline
I did something like this , with my main wrangle here. Thanks you again Tomas, @tamte for showing the first steps
and file input have this :
`chs("../file_" + (detail("../meta", "iteration", 0)+1))`
I might do a revision later but for now, i need to free my brain from that for a little bit
and file input have this :
`chs("../file_" + (detail("../meta", "iteration", 0)+1))`
I might do a revision later but for now, i need to free my brain from that for a little bit
Edited by vinyvince - April 27, 2022 13:25:39
Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
-
- Quick Links