enumerateFiles and current working dir

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  03 March 2013
enumerateFiles and current working dir


Im confused... :(

I am writing a cleanup script for the max scenes here, they are a mess -__-

So my confusion comes when I absolutely know that a texture is missing because the path is point to someones desktop... sigh, and yet when i run

--This is not my code
--I got it from a script that bobo wrote so im sure it works

fn get_names name a = 
	append a name
files = #()
enumerateFiles get_names files #missing

It does NOT return the offending file?! Weird right?
It does however return other files that are missing...

The really weird this is that when I click the bitmap button of the texture that is pointing to the someone else's desktop, there is a texture file named correctly in the folder that max is opening (CWD?), is max using this one and ignoring the path displayed in the UI?

When i merge the file into a new max file the texture is still pointing at the a someone else's desktop, but when i click the bitmap button there is no image in the folder that max opens.
Now when running the code above the missing file gets added to the array.

Any help understanding why this is happening would be great, i dont really want to merge all the scenes, scripted or otherwise, into clean max files, seems a little dangerous, and what if the CWD just happens to have the texture that max is looking for??? Then i would not get a correct "missing" list back from the enumerate

Thanks in advance
  03 March 2013
The file status is most probably #found, I guess it's in the (sub)folder of the original maxfile you are working with (which, along with custom maps path, is where max looks when it doesn't find the file at its path). When you merge it to a new maxfile (different working directory), the file is no longer in the same location as the maxfile and the status is #missing.
Scripts :: linkedin
  03 March 2013
ok that makes sense, thanks

I ironically want to turn that off, is there a way that if max doesent find the file at exactly the use specified path then it wont look for it anywhere else?

  03 March 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 03:15 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.