Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Batch import obj/fbx?

23 REPLIES 23
SOLVED
Reply
Message 1 of 24
Anonymous
21094 Views, 23 Replies

Batch import obj/fbx?

Hi,

I was wondering if there is a script or a way in maya to batch import meshes?

Thanks!

23 REPLIES 23
Message 21 of 24

I ran into this issue today. I couldn't figure out what it was in my settings that I needed to change to get batch importing to work. Instead I wrote a small script to get around the problem.

 

So if you run into this issue you could try this script

string $files[] = ` fileDialog2 -fileFilter ("*" + ".fbx") -fm 4 -okc "Select Files"`;
for ($file in $files){
    FBXImport -file $file;
}

blog post about script:
https://www.artstation.com/dankeating/blog/WRME/batch-fbx-import-for-maya

Message 22 of 24
NickolasWilson
in reply to: mspeer

I had the same problem importing multiple fbx files, around 200 in my case, so I googled this issue and found this solution by artist Daniel Keating.
https://www.artstation.com/blogs/dankeating/WRME/batch-fbx-import-for-maya
It doesn't require a Maya reset or anything: it's just 3 lines of MELScript, and the import window that follows allows you to select multiple fbx files. Hope that helps anyone else on this path! If it has, give Daniel Keating a thanks on their post!

Message 23 of 24

And then I read the final post in this thread, where Daniel has posted his solution already 😄 @dankeating3d Thank you!

Message 24 of 24
andrew.greenleeZLBFD
in reply to: Anonymous

I found why this was happening to me. Back story is, I always preferred to use the File options (in prefs) "OS Native" which shows a windows window instead of a Maya window. Hated the Maya I/O gui for years, it was slow to populate on some servers and had trouble remembering my bookmarks (prolly due to work workspace practices and proprietary stuff). 

 

Anywho, changed my settings back to Maya default for File preferences and my fbx batching script started working. I had tested resetting prefs and that worked, but then had the idea to try just the file related pref on a whim and sure enough that was causing some sort of conflict/ behavior that would block my script from running processes on multiple files in a folder. That is likely the issue for some others here.  Probably why I often got naming coflicts/namespace errors on fbx imports regardless of settings. . . 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report