[Closed] Variables (Scripting) in Rollout Definitions
Hi there,
So I have this rollout, containing 20 parameters with 16 slots for each one. Something like this…
--continues above
bs_constraint_val_14 type:#float ui:bs_constraint_val_14
bs_constraint_val_15 type:#float ui:bs_constraint_val_15
bs_constraint_val_16 type:#float ui:bs_constraint_val_16
bs_rotation_val_1 type:#integer ui:bs_rotaion_val_1
bs_rotation_val_2 type:#integer ui:bs_rotaion_val_2
bs_rotation_val_3 type:#integer ui:bs_rotaion_val_3
--continues below
And the inability to use even simple variables and scripts in the rollout definitions is driving me nuts (and hurting my arm). 16 x 20 is 320 lines of code describing each value. How can I use an index or variable or script to condense this?
i.e.
for i = 1 to 16 do
(
bs_constraint_val_[i] type:#float ui:bs_constraint_val_[i]
)
Yes, I know that doesn’t work.
I’ve never actually used it, but check out RolloutCreator in the reference.
thanks.
from maxscript help:
[left]
[/left]
[left][size=2][font=Verdana]<rollout_creator>.addLocal <string> [init:<value>][/left]
[left][/left]
[left]This function can be used to add local variables to the rollout definitions. The variables value can be initialized by passing the init: value[/left]
[left]
[/font][/size][/left]