PDA

View Full Version : Variables (Scripting) in Rollout Definitions


beeek
01-15-2010, 03:16 PM
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.

Mathieson
01-15-2010, 04:26 PM
I've never actually used it, but check out RolloutCreator in the reference.

beeek
01-15-2010, 04:56 PM
thanks.

from maxscript help:








<rollout_creator>.addLocal <string> [init:<value>]









This function can be used to add local variables to the rollout definitions. The variable’s value can be initialized by passing the init: value

CGTalk Moderation
01-15-2010, 04:56 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.