problems about setting multi-parm in HDA processor

   1074   4   0
User Avatar
Member
6 posts
Joined: 7月 2022
Offline


Hey guys, i have been developing my HDA tool for weeks and finally its done. the tool helps me generate a set of wall modules that could be used in my procedural building generation tool.
in my HDA tool, i need to assign a integer value(Let's say 'N') that represent the total number of sidewalls(which is a multi-parm), then the tool would generate N setting tabs for each sidewall. and in each tab i could further customize the details of each sidewall.
now, in order to batch generate many sets of modules, i was considering putting my HDA in PDG to automate the process.
During the process, there are two problems that i need to solve.
1. in my HDA tool ,there are constriants between some HDA parms that i implemented using callback scripts. however, in TOPS network, since the parms were assigned in parallel. the callback scripts constriant wont work properly. My current solution is to pre-generate all params in a python scripts.
2. now comes to the second issue, since i was using multi-parms in my HDA, the children tabs wont appear until the number('N') generated and assigned to it. so i have no idea where to put my variables.

any suggestions would be appreciated!
Edited by richard269090576 - 2023年9月27日 00:20:22
User Avatar
Member
313 posts
Joined: 10月 2016
Offline
where to put my variables.

Just a quick suggestion could be to use the parm itself as a variable. Then build your code around that so it works. Use try and except to avoid errors.
Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
User Avatar
Member
6 posts
Joined: 7月 2022
Offline
SWest
where to put my variables.

Just a quick suggestion could be to use the parm itself as a variable. Then build your code around that so it works. Use try and except to avoid errors.
thanks, i knew using parm as variables, but the main point it i dont have place to insert them since they were not generated before the multi-parm has been assigned a proper value.
User Avatar
Member
6 posts
Joined: 7月 2022
Offline
:/
any help?
User Avatar
Member
313 posts
Joined: 10月 2016
Offline
You can first define a list that has zero length.

Later you can get the length of a (future) list from a multiparm.

Then you read each item from the multiparm into your list using a loop.

To get the name of the parm you first make a string for the parm name, then use that string to get a parm value.

I hope that helps.

Cheers!
Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
  • Quick Links