strange problems with smart import.

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
DaveMcD
Posts: 7
Joined: May 9th, 2007, 8:48 pm
Contact:

On a few projects lately I've found a couple of issues with smart import.

It usually works fine except for certain sequences in the top level folder that begin with letters from M onwards. Recursive folder imports don't exhibit the problem only the top level folder. What it will do for the top level folder is decide its not a sequence and import them as individual frames.

Because it seems to be letter dependent it looks to me like the path string the script is generating is getting confused by reserved unicode combinations. so P:\new_render_[####] has a reserved character of \n which is a new line character usually.

Now I'm ok at scripting inside 3dsMax etc but jscript is a bit new to me so I cant figure out what would need to change in smart import to make it work. Anyone else got any ideas?

Cheers

DaveMcD
DaveMcD
Posts: 7
Joined: May 9th, 2007, 8:48 pm
Contact:

hmmm.... actually my logic is maybe flawed a little.

My theory now is that it falls over when the file sequences at the top level start with a letter later in the alphabet than any folders in that directory.

So if my root level sequence is:

freds_anim_{####].tga

and there is a folder starting with anything before F (say Diffuse_Renders)then freds_anim sequence will be imported as individual files. Again any scripty advice on how to fix this is appreciated.

DaveMcD
DaveMcD
Posts: 7
Joined: May 9th, 2007, 8:48 pm
Contact:

ok managed to kind of fix it.

Turns out that if any folders are alphabetically before the sequence name it will stop processing it as a sequence.

for (i = 0; i < parseResults.length; ++i) {
if (parseResults) {
if (! result) {
result = files;
}
} else {
//case in which a file name did not contain a number
result = null;
break; //this is the line that will break a root folder sequence that is alphabetically after any folders.
}
}

If you comment out the break it will work but obviously keeps going over all the itmes, so could be slow.

Dave
Post Reply