[Closed] A couple tricky UI questions
- In Maxscript can you dynamically generate variable names?
eg, could add controls to a rollout using a loop, or create variables dynamically from strings (same thing).
- This extends from the first question…but can you add/remove controls to a rollout that has already been initialized?
- Why would you want to dynamically create variables? Couldn’t you just use an array?
- You can add and remove rollouts and subRollouts, but i’m not sure about elements within the rollouts themselves.
- Why would you want to dynamically create variables? Couldn’t you just use an array?
No. In some programming languages you can dynamically (while it is running) generate variable names. This gives a lot of power…for example, I could easily use a loop to create buttons on a panel in a specific mathematical position using only a few lines of code, instead of defining each button with extra lines of code.
- You can add and remove rollouts and subRollouts, but i’m not sure about elements within the rollouts themselves.
Yeah you probably can’t do it. I wanted to have certain controls on my rollout be used to duplicate other controls.
To create ui controls take a look at the
RolloutCreator Functions.
To create variables dynamically, you could use execute?
Georg
Generally you remove the rollout, modify the contents, and then add it back on. Not exactly what you wanted but there it is.
J¬