ScriptSpot

Forum topic · General Scripting

missing files

By tinnnpo · 2012-02-26

Description

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 (2)

tinnnpo · 2012-02-26

thank you very much for your help :)

its a known bug of that function

Anubis · 2012-02-26

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.