ScriptSpot

Forum topic · General Scripting

list all morph targets in listbox

By splinterD · 2011-02-17

Description

hi guys im trying to load all morph targets of an object
into a listbox that later ill be able to choose a morph channel
and assign it to a controller .

im having some problems with it...
this code works for getting the name of a specific channel :
WM3_MC_Getname $.morpher 1

but i cant get all the names of all the channels into an array , or at all.
im trying to do a loop to loop through the channels and list the names into
an array to use in the listbox.

can anyone help ?

Comments (2)

nice!!!

splinterD · 2011-02-18

thanks allot !!!
i managed to do something similar
but this is much cleaner :)
thanks again !

snippet code

Anubis · 2011-02-17

mf_mod = $.morpher
channels = #{} -- empty bitArray
for i=1 to 100 do channels[i] = WM3_MC_HasData mf_mod i
channels = channels as array
listNames = for num in channels collect WM3_MC_GetName mf_mod num