I have a float[] array containing keyframe numbers. {1,5,5}
I want to:
- append more floats into that array (3) —> {1,5,5,3)
- remove duplicates {1,5,3}
- sort them {1,3,5}
- find (match) a specific item in the array list (5) —> found
- retrieve the match’s index number in that array (5)'s index = 2
I know MEL has a lot of array functions that could be useful to me (appendStringArray, stringArrayRemoveDuplicates, sort, etc) but most of them are made for string arrays, not float arrays…
What’s the easiest way to do this? Should I use Python instead? Or should I try to find a way to convert this float array into a string array…?
Thanks for your help.