MakeUniqueArray problem

Hi!

I have problem with MakeUniqueArray function it work perfect in 3dsmax 7 and 3dsmax 2011 however it didn't work on 3dsmax8 and 9

have you the same problem?

for exemple...

yyy= #("a","b","a")
yyy= MakeUniqueArray yyy

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tinnnpo's picture

thank you barigazy

I already did my own function and if some one want to use it here is it :)

fn mkUniqueArray Arr =
(

local arr1=#()

for i=1 to arr.count do
(

if (finditem arr1 arr[i])==0 then append arr1 arr[i]
)
arr = arr1
)

barigazy's picture

make unique array function

This is maybe the solution for your problem (by Denis Trofimov [denisT])
fn uniqueArray Arr =
(
hashes = #()
for a in theArray where (finditem hashes (h = gethashvalue a 0)) == 0 collect (append hashes h; a)
)
yyy= #("a","b","a")
nevArr = uniqueArrays yyy

barigazy

tinnnpo's picture

Oh found why..

I found why it don't work the problem is because this one is available with avguard extension...I have it for max7 but dont have it for other...and it should be automatically added for 2011.

so if some have the same problem this will work only if you have avguard... hope it help...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.