SetSelectFilter shortcut or script
Hi i'm new in max scripting, and i need help
i trying to make a shortcut to set selected filter,
so i decided to create a dropdown menu to choose from so i wrote
rollout FilterSelect "Select" width:99 height:54
(
dropdownList FilterSelect "Filter Select"
items:#("All","Geometry","Shapes","Light","Camera","Helpers","Warps","Bones")
on FilterSelect selected i do
(
local f = FilterSelect.count[i]
SetSelectFilter f
)
)
createdialog FilterSelect
i know its totally wrong alla i want to do is to make a variable from the index number of the array ...and choose the filter number from it
is there a better way to do it.. or if its wright can some please help me with the syntax
Comments
is this?
Note - I see you use the same name (FilterSelect) for the Rollout name and for the DropdownList, and I rename them to roFilterSelect for the rollout and ddlFilterSelect for the DropdownList.
my recent MAXScripts RSS (archive here)
thanks alot :)
thanks a lot for replying i thought no one will :)
I've changed it to
rollout FilterSelect "Select"
(
dropdownList FilterSelect "Filter Select" items:#("All","Geometry","Shapes","Light","Camera","Helpers","Warps","Bones")
on FilterSelect selected i do
(
format "You selected '%'!\n" FilterSelect.items[i]
SetSelectFilter i
)
)
createdialog FilterSelect
and it worked :)
i will compare the 2 scripts so i can understand how maxscript thinks
i know what you mean about naming the variables as its function... i will change this bad habit :)
thanks again man ;)