[Closed] Creating A Drop Down
Hello
Im new to Maxscript and was wondering if you guys could help me out.
Basically i have to create a UI to do various things.
I need to create a drop down list and when an object is selected it creates it in max…
Been stuck on this for ages
This is what ive got so far:
try (destroydialog test_button) catch ()
rollout test_button “Reset Max”
(
button theButton “Reset Max”—Creates Button
on theButton pressed do—When pressing Button
resetMaxFile #noprompt—Resets Max File
dropdownlist scale_dd “Shape:” items:#(“Box”, “Plane”, “Pyramid”, “Cone”)
on scale_dd selected i do
format “You selected ‘%’!
” scale_dd.items[i]—???
)
createDialog test_button 300 150
Ill be grateful for any help
Thanks
Here you go, try this!
try (destroydialog test_button) catch ()
rollout test_button "Reset Max"
(
-- store the classes you want to make into an array
-- This can be added to
local classItems =#(Box, Plane, Pyramid, Cone, Torus, Hedra, Capsule)
button theButton "Reset Max"---Creates Button
on theButton pressed do---When pressing Button
resetMaxFile #noprompt---Resets Max File
dropdownlist scale_dd "Shape:" items:(for i in classItems collect i as string)
-- call the constructor of the class item from the selected index of the dropdownlist
on scale_dd selected i do classItems[i]()
)
createDialog test_button 300 150
sounds like paradox
but you are in the right place. all people are very kind here and always ready to help.