Notifications
Clear all
[Closed] Script flow problem
Jan 12, 2007 3:30 pm
I am relatively new to Maxscript and I am having a problem running the attached script. The first time it is run, it does not work. If it is run again however it works fine. There are obvious work around for this problem but I would really like to know if anyone knows why this script does not work first time and a good solution to make it work? I have a feeling I am missing something quite fundamental…
fn createMasks =
(
if matMasker.DSMaskCheck.state == true then
(
print "Check box is true"
)
else
(
print "Check box is false"
)
)
rollout matMasker "Masking"
(
checkbox DSMaskCheck "Mask" checked:false
button DSCreate "Check Status"
on DSCreate pressed do
(
createMasks()
)
)
DSFloater = newRolloutFloater "Material Masker" 200 100
addRollout matMasker DSFloater
Thanks,
Rob
1 Reply
Jan 12, 2007 3:30 pm
I have got it sorted. Nevermind.
For those that are interested if you define the rollout as a variable at the start it seems to fix the problem.