r/Maxscript • • Sep 04 '23

Help with rollout variables

I hope someone can help me out here. (It's probably a very basic misunderstanding on my side)...

I have a rollout with lots of buttons and sliders.First button is a load-button to load a model into max, and the following sliders and buttons can access the properties of the object and for instance rotate the object.But when I run the script, I get a lot of errors because the sliders don't yet know the object or the properties of it...Now, how do I get around this problem?Ideally the bottom of the rollout shouldn't be active until an object has been loaded.

I have tried with two rollouts as floaters where the second one doesn't load until there's an object. But then I get errors in THAT part because Max STILL doesn't know anything about the object yet.

Can someone tell me in what order Max evaluates the script?

1 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/ThatDude461 Sep 04 '23 edited Sep 05 '23

THANK YOU SWORDSLAYER!!!I had it all backwards, but this looks like it works! :)

Edit: Now, how do I change the range: parameters in the rollout? Some of the min/max values should be set to for instance bounding box min/max.

Maybe use variables in there, and update via a callback?

Edit 2: Got it - Just use sampleRol.sldScale = Whatever range I want.