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
Forum topic · General Scripting
By tinnnpo · 2012-03-04
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
thank you barigazy
tinnnpo · 2012-03-11
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
)
make unique array function
barigazy · 2012-03-10
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
Oh found why..
tinnnpo · 2012-03-04
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...