2.49b: For BATCH import of .obj files, is it normal to have to TYPE the directory name into the import dialog, rather than SELECTING it?
I’d been unable to get the .obj importer to do BATCH imports, though it could do INDIVIDUAL imports, and it seems to work fine for everyone else, and I think/thought I was invoking the script correctly, via <shift>lmb from the import menu for batch. The result of doing that would be a dialog correctly stating, “Import OBJ Dir”; as I then clicked through directories to get to the one with .obj files in it, they would appear in the top field of the dialog, and I PRESUMED that the correct next step would be to LEAVE THE LOWER FIELD BLANK, (which is normally where you would put a FILEname if asking to import ONE FILE), and then click the “Import OBJ Dir” button.
This always FAILED, with a message box, "Can’t open file:… ", with the DIRECTORY path named as the FILE it couldn’t open.
So, the fact that it was naming a DIRECTORY as if it were a FILE that it couldn’t open seemed suspicious to me, as was the fact that the script seems to work just fine for everyone but me.
So, even though I don’t know Python, I kept looking at the code, and discovered that there was no EXPLICIT error message like what I was getting, but entry to the relevant routine had an error return procedure that said:
So I figure THAT’S probably what’s “short-circuting” the program flow; but WHY?
Now I knew that every time I put a FILE in the second (lower) field, it errored FURTHER DOWN in the script, with the error message indicating that that wasn’t a PATHNAME, so at least that was getting past the error procedure;
so EVENTUALLY I tried something different:
I mouse selected the directory immediately ABOVE the directory that had my .obj files in it, and then TYPED IN the name of the actual directory that had my .obj files in it, into the LOWER field (because SELECTING that directory with the mouse ALWAYS put it up in the TOP field of the dialog, which NEVER worked);
And TYPING the target directory name into the BOTTOM dialog field WORKED.
But my question is, is that the way it’s SUPPOSED to be used??
That was not at all “intuitive”, at least for me, and I never saw any instruction to do it like that anywhere.
(Now when it worked, it DID put each object in individual scenes, but I fixed that with a suggestion I saw somewhere else, namely to comment out the lines right after "for f in files: " in the BATCH section:
#scn= bpy.data.scenes.new( stripExt(f) )