Batch Export/Import

19 votes
Version: 
v04.05
Date Updated: 
05/17/2016
Author Name: 
Jos Balcaen

This is a free script, for non commercial use.

This is the perfect script to transfer your models from 3ds Max to ZBrush/Unity/UDK/...
Basically it batch exports objects to multiple files.
Supported formats : max, obj, fbx, 3ds, ase, dwf, dwg, dxf, dae.

General features

  • Very easy to use script
  • All options are saved.This means all checkboxes, text fields will remember your change.

Export features

  • Reset geometry. Apply the boxmethod to every object (reset transformation etc.). Optionally move the pivot to the origin.
  • Delete turbosmooth. Delete the TurboSmooth modifier before exporting.
  • Move to [0,0,0]. Move objects to the origin before exporting
  • Rotate the objects before exporting (to fix rotation problems)
  • Scale the objects before exporting (to fix scale issues)
  • Name change. Add prefix and/or postfix to the name of the objects before exporting.
  • Combine collision mesh. Mesh with the same name and the given prefix/postifx will be exported together (ex. UCX_).
  • Combine LOD's. Meshes with the given prefix/postfix will be exported to the same file. For example _LOD* (* means numbering) for unity.
  • Group support. Objects in a group are automatically exported to the same file. If the Collapse groups option is enabled, the group will be collapsed to one mesh.

So no need for an export scene. You can check the options and everything will be perfectly exported.
After exporting the scene will be restored.

This script has been updated several times by user requests.
If you have any remarks, requests or feedback, feel free to contact me.

 

Additional Info: 

How to install

You can easily run the script by dragging it in 3ds Max. If this doesn’t work, choose MAXScript -> Run Script…

Create button

If you want a button in 3ds max, you need to create one yourself. Here are the steps:

    • Save the script to a location. (Example C:\Program Files\Autodesk\3ds Max 2013\scripts\)
    • Open the MAXScript editor (MAXScript -> MAXScript Editor…) and create a new script (File -> New)
    • Copy paste the following code:

 

 

macroScript JosBatchExporterImporter
category:"Custom"
tooltip:"Export/Import multiple objects/files v04"
buttonText:"EXP/IMP"
(
srchDir = getDir #scripts
scripts = getFiles (srchDir + "\\JosBalcaen_Batch_Exporter_Importer.mse")
 
if scripts.count != 0 then(
sort scripts
latest = scripts[scripts.count]
fileIn latest
)
)

  • Change the path to the location where you saved the file
  • Run the code (Tools -> Evaluate All) .
  • Don’t worry, nothing should’ve happen.
  • Go to Customize -> Customize User Interface
  • go to the ToolBar tab and choose as group “Main UI” and Category “Custom”.
  • Drag Export/Import multiple objects/files v04 somewhere on the Main Toolbar to create a button
Version Requirement: 
2011/2012/2013/2014/2015
AttachmentSize
josbalcaen_batch_exporter_importer.mse61.14 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jos's picture

Uploaded new version

Hi, I've uploaded a new version that fixes a crash with the ini file. Please delete the ini file and try this new version. There was a bug when there were too many import paths in the list. Fixed now! Let me know if you still have problems

jos's picture

Doesn't look like a valid max

Doesn't look like a valid max file. How was this created?

jos's picture

1. This is not the first I

1. This is not the first I hear this, but I haven't been able to figure out what the problem is. Would you be able to attach your ini file so I can try it?

2. I don't know of any limit. Can you try with a smaller amount? If the problem persist I can have a look.

Hope we can fix these issues!

mayiaba's picture

How many files can it handle?

Dear Jos,

I am trying to use your script and I have come up with the following 2 issues:
1. I have to erase.ini file every time I use the script, and I intend to use it a lot. Is there a way to stop it from generating this file so that I don't have to erase it and restart Max every time?

2. Although I can choose a big amount of files to import, it doesn't actually do it. I am trying to import 350 small .FBX files. Does the script have an upper limit?

Thank you,
M.

X-Night's picture

problems with import .max file

Hi, I have a big problem: with 3ds max 2013 and this script, when I try to import a .max file, 3ds max 2013 give me this error: File Open Falied... anyone know the solution?

(I put here the file that I want to open)

Sorry for my bad English, I'm Italian.

AttachmentSize
247.max 201.78 KB
brainsgonedead's picture

Lumion

Hi, was wondering could you modify your script so that it can export to Lumion at all pls? I am looking for a script that doesn't open the FBX window but exports using the right options (such as no triangulation etc) but I would like to be able to edit the script to include/exclude options on the export.

Any help would be appreciated, it truly would.

Thank You for any reply :)

joma's picture

solved

works perfect
thanks!!

jos's picture

Delete ini file

Please delete C:\Users\jos\AppData\Roaming\Maxscript\BatchExportImportOptions.ini
Let me know if it's still happening after that

seher3d's picture

Error running script

Hello, I'm running Max2016 and was able to get your script to running perfectly the first time (thanks!). But when I try to run it again I get a syntax error and it wont run the import, just export and info. Below is the error...

--Syntax error: at .., expected
-- In line:
#("C:\\Users\\ and the rest here is the path to the extracted folder and contents....

any help would be greatly appreciated! Hopefully not bugging you with a super simplistic fix...I reset max, reextracted my folder, nothing seems to work.

Thanks again.

joma's picture

error in 3d max

when I use script appear a Maxscript rollout handler exception. I tried to replace the script but the same error appears. Can you help with this? thanks

AttachmentSize
1.jpg 62.83 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.