missing files

Hi! I have a problem to get the number of missing files in a single object here is my script
the problem is that this script append the path of the texture 2 time for exemple if there is 2 missing files it it say that there is 4 what I am doing wrong?
if I use #localonly flag it didn't show anything.

global missingfiles = #()
 
function get_names name FilesArray = append FilesArray name 
 
enumerateFiles $Plane01 get_names missingfiles #missing
 
print missingfiles.count

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 very much

thank you very much for your help :)

Anubis's picture

its a known bug of that function

Nothing wrong in your code usage, this double result is a bug of enumerateFiles function, it return fine result only then there no last named (and optional) argument (like #missing, #localonly and so on). You can use makeUniqueArray after it to cleanup your array, or if just the .count is important you can devide the result by 2.

my recent MAXScripts RSS (archive here)

Comment viewing options

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