[Closed] Morpher
Is there a way to get MAXscript to return an interger of how many channels have targets from a morpher modifier? I can’t find anything from MAXscript reference.
Because a morpher modifier has a possibility of 100 morphs, you could run a loop like this:
(
local morphCount = 0
for i = 1 to 100 do
(
if WM3_MC_HasData $.morpher i then (morphCount += 1)
)
print ("your object has " + morphCount as string + " target(s)")
)
In addition, if you wanted to know which slots held targets, you could append the value of i to a seperate array when WM3_MC_HasData returned true.
–Jon
but if you are dealing with a selection and want to check this for each object in the selection then will this not be too slow??? is ther a better way to find out
The difficulty here is that their is always going to be 100 morph channels, regardless of wheather they have any thing assigned to them.
The only way to be sure (that I can see) is to iterate through them.
Shane