Notifications
Clear all

[Closed] Maxscript and Fume

Im new to maxscript and im struggling with this problem, I want to be able to list my fume grids in a rollout list box

if i run the code i get
#($FumeFX:FumeFX002 @ [-129.555267,10.288780,-8.553362], $FumeFX:FumeFX001 @ [3.185154,10.288780,-7.496874]) in the FFXGrp array.

But not sure how to get it into FFXGrpList as FumeFX001 and FumeFX002 as what ever i try i get errors, saying needs to be type:string or needs to be in a array

appreciate any help

FFXGrp = #()
FFXGrpList = #()
if $ != $selection then
(
FFXGrp[1] =$
)
else
(
for obj in ($ as array) do
(
if classof obj == FumeFX do
(
append FFXGrp obj
print obj.name
)
)
)
try(destroydialog playBlast) catch()
rollout playBlast “PlayBlast FFX”
(
listbox _FFXGrp “FFX Group” items:FFXGrpList
)
createdialog playBlast

1 Reply

That is correct, listbox needs an array of strings for its elements so that it knows what to display to the user. Normally you would collect the names of the objects for the listbox, then internally have another synchronized array that has the nodes themselves that you would use when the user picks something in the listbox (the clicked events return an index of item clicked, you would use this to get the equivalent element of your node array).