Looking at some older threads, this problem seems to have been discussed before. However, making the ATSOps.Visible = true, doesn't seem to work for me? Any ideas?
I have a function that returns the FileList Array:

This returns my nice scene file list minus the actual max file and only network path bitmaps which are NOT UNC, ie: I only get "drive-mapped" assets, such as bitmaps. Then The selection code below fails..What gives?..! I have tried the "ATSOps.Visible = true" command but it doesn't solve this problem..!

Any ideas why my array isn't getting selected? I don't want to use a loop as it is slow...
Mike

ZeBoxx2

01-29-2009, 05:05 AM

seems to work fine* here..
are you sure the values in SceneFileList are valid when you call the SelectFiles method?

I noticed you're checking "iCount != 0", but iCount is a local variable to the function - you should probably use "SceneFileList.count != 0" instead.

* Except that it failed on a new scene that was not yet saved - before deleting the first item in SceneFileList, maybe make sure that's the current scene file and not e.g. a bitmap.. just in case :)

MikeOwen

01-29-2009, 03:54 PM

Thanks Richard, but its still not selecting the files in asset tracker!

I have checked that all paths are valid (by valid, I guess you mean that the file does exist and its array "string" is correct?) and the bitmaps open within 3dsMax fine.

For example, the following array containing 2 items does not work?

"Z:\Maps 2\Car THING\Test.jpg"
"Z:\Test\Van thing\Test2.tga"

I have removed all references to icount and replace with "SceneFileList.count != 0" instead.

The script never runs until the file is saved so that is fine. Also the first item in the array, is always the actual scene max file, so that is ok as well...

I'm running out of ideas, why the array won't be selected:

ATSOps.SelectFiles scenefilelist

I'm wondering if I have no choice, but to use something like "pathConfig.convertPathToUnc" on the array and then use "ATSOps.SetPath " to set the path from the array?

Strange :-(
Mike

ZeBoxx2

01-29-2009, 06:15 PM

haven't the foggiest, then :\

What I meant by 'valid' is that the strings as they appear in your array after you filter them match the strings actually in the asset tracker - but presumably they do. Here's my quick test to see if the spaces had anything to do with it - 3ds Max 2009x32;

seems to work fine. What are the paths set on within the asset tracker? The above are just two BitmapTextures used in scene objects' materials.

If all else fails then you probably do have to use a loop, but there must be some reason why it's failing in the first place.

Zbuffer

01-30-2009, 08:51 AM

Hi,

For example, the following array containing 2 items does not work?

"Z:\Maps 2\Car THING\Test.jpg"
"Z:\Test\Van thing\Test2.tga"

In both strings there is a '\t' wich max intrprets as a TAB character
You may need to fix this by replacing all '\' by '\\'

ZeBoxx2

01-30-2009, 10:08 AM

would be odd - \t (and any other escaped character) only becomes a problem if you feed functions the string manually, rather than a variable that contains the string...

doesn't seem to matter here either*.. but it's worth a try anyway.

*
SceneFileList = ReturnFixSceneFileList_ATS_Visible()
#("z:\a filename not in the starts-with-a-t folder.jpg", "Z:\this folder starts with a t\a filename that doesn't start with a t.jpg", "Z:\this folder starts with a t\this filename starts with a t.jpg")
if (SceneFileList.count != 0) do (
SceneFileList = ( for n = SceneFileList.count to 1 by -1 where (pathConfig.isUncPath SceneFileList[n] == false) and (pathIsNetworkPath SceneFileList[n] == true) collect SceneFilelist[n] )
)
#("Z:\this folder starts with a t\this filename starts with a t.jpg", "Z:\this folder starts with a t\a filename that doesn't start with a t.jpg", "z:\a filename not in the starts-with-a-t folder.jpg")
ATSOps.SelectFiles SceneFileList
OK
ATSOps.numFilesSelected()
3

MikeOwen

01-30-2009, 01:33 PM

Hi,
OK, a bit more testing today but now it causes MAXScript to stop working!
I have broken this code down to the absolute minimium now and I know which line is failing but I don't understand why it is..! Perhaps it is unique to my pipeline?

My scene is simple. Create 2 teapots. Assign different std mat to each teapot. Both materials have different bitmaps located on a windows file server. 1 bitmap is resolved to a UNC path using the Asset tracking GUI. The other is left as a drive letter mapping (Z:\Vehicle Maps\Airbags\Reference\). Running the code below, it locks up MAXScript on the "for collect" loop. However, both individual tests in the "for loop" work successfully every time when executed individually and provide the correct result from the tests.