ScriptSpot

Script

Mass exporting of selected objects in 3dsmax

By Anton Berg · 2009-08-23

Version
1.6
Version requirement
2012
Date updated
2017-11-03
Votes
35
Homepage
www.os3d.se
Description

'

V1_6:
Update to support 3dsmax 2018

New Features
-- Settings in the util are stored in a ini file, so they are kept when you quit the util
-- I added a reset ini button so you can go back to the default settings
-- A simple button that selects all visible objects
-- I also made the outputPath button show the current outputPath..

My first version of this script was created to simplify the process of exporting many objects from one 3dsmax scene into separate obj files.

Now I have added another feature by request from a user so it now supports exporting frames or a framerange of the selected objects.

Lets say you have created some sort of simulation inside 3dsmax and want to import that into another tool. Ex cloth simulation.

This will create a separate .obj file for every frame and also every object you have selected.

You can run it by just dragNdrop it onto 3dsmax.

-- Settings in the util are stored in a ini file, so they are kept when you quit the util
-- I added a reset ini button so you can go back to the default settings
-- A simple button that selects all visible objects
-- I also made the outputPath button show the current outputPath..
-- I have added group support, if there is a group in the selection it will export the whole group as one file.

-- I have added a new "single mesh" feature. This takes the group you have selected and snapshots all the parts attaches them together into one mesh, it then exports that mesh. This makes one mesh out of the whole group. This might be useful for someone. I believe it can be useful for importing animated objects into realflow.

-----------
Anton Berg
OgmaSoul3D

Additional Info

Features: SingleMesh: To use this do the following; 1) just in case... always save your scene before running this, some fileformats causes 3dsmax to crach when trying to batch.. 2) group all objects that should be "one mesh" 3) check the singlemesh checkbox 4) export... you will see that your objects will get snapshot during export... but after every export the snaphoted versions are deleted.. Fixed bugs: In version 1.0 I fixed a bug where the browse button did not work! Known bugs: I know that some export formats does not support the "Export Selected" function which makes this script not very useful for certain fileformats. I have tried .obj and .3ds alot and thoose work. (you still have the old issue with 3ds format and the 64K limit in facecount, but that is the limitation of 3ds) I hope someone else finds this useful! Anyone that has some tips of how to import an .obj sequences into maya/softimage/houdini are very welcome to comment! Since this is not my main tools I am not the wiz on that.
Attachments

Tags: export, Frame range export, os3d, ogmasoul3d, obj export, export selected

Comments (27)

Add option to move models to the center of grid before exporting

TuKirito · 2019-03-06

It would be nice to have an option to export models as if they were centered on the grid, an option would be to just change their coordinates to (0,0,0) when exporting or you could temporarily move them before exporting and then putting them back to their previous position.

asymptote · 2012-03-20

Cool, frame on/off works perfectly, sorry I hadn't noticed the settings are saved on exit.
Yes I used a "1" in the frame range and renamed the files after export, that's less work for me now ;)
One thing i have noticed is the "Info" window in 1.4 doesn't display the example file name.(maybe intended)

Anyway, Many thanks this is a big timesaver. It should be built into Max.

ok fixed that... version 1.5

Anton Berg · 2012-03-20

fixed the status update window..

asymptote · 2012-03-20

Remember last settings and output folder would be cool, also is there any way to edit the script not to add the "-Frame_1" suffix to the file name ?
I have to export lots of single 3ds without animation and would like it to just export the scene with objects name only.

thx

Anton Berg · 2012-03-20

I am adding a new version now 1.4 that have a _frame on/off switch..

I recommend that you set the frame range to a single frame value like
0 or 1

if you add a range it will export the same file many times and overwrite the old ones.. (since I am not adding the frame value)

since version 1.3 it save the last values in an ini file... so they should get loaded the next time you run the script.

regards,
Anton Berg

*.max file???

matmatmatty · 2012-03-19

Any chance of including a max scene file type in the export dialogue?? I need to save out multiple objects (vray proxies) in there own max scene. This tool would be perfect for this....

I like the idea.. do you need to support frame ranges?

Anton Berg · 2012-03-20

Do you need frame range support in the first version?

I might lean towards changing this util or making a special version for proxy gen... since it will probably work a bit different though..

another important question.. Vray version? are you using the latest version?

regards,
Anton Berg

AWESOME

carrrottt09 · 2011-09-01

This is great.
Fits what I was looking for perfectly.
Thanks for developing this.

Any chance this could be made

asymptote · 2011-05-17

Edit, Ahh my bad it works fine in 2011

A "remember last settings/output location" would be cool, I just use this to export multiple 3ds files on a single frame and have to keep resetting the preferences every time.

thx

What an awesome time saver!

wannabeartist · 2010-11-02

If you are still developing this, may I suggest a feature? It would be great if the script would remember the last output location!

W DIGITAL · 2010-10-07

ok works great now

but please tell me, how can we make ONE obj sequence with all the mesh inside, this is very important for a realflow workflow,

please let me know if you can get that to work

a temporary solution is to group the objects you want to export.

Anton Berg · 2010-10-07

I put alot of work so it does just that... aka exports every object as a separate obj sequence... since that was the need to import the objs into houdini...

But I think might be possible. Will take some work though.

One thing you can do (which you might not like). you can group all the objects that should be exported as one obj and then do the export. The script should support groups. I know that groups and animation can be very messy... so ungroup after export.

W DIGITAL · 2010-10-08

thanks, but groups are exported as single objs as well,
no the goal is to have one obj sequence of all the mesh combined, this we need in realflow to scatter prticles on,

is there anything you can do to help us get multiple mesh into ONE obj sequence? (attaching multiplemesh tends to destroy the animation, unless u know otherwise)

thanks, would be great to have ONE OBJ sEQUENCE of the scene

The grouping should solve it for for you...

Anton Berg · 2010-10-08

I tried it now and it should work for you... if you group all objects into ONE group then that whole group should be exported as one obj file called
"groupName-frame00001.obj" I do not get a separate file for all the objects in the scene.

Or are you talking about getting "one mesh" object inside realflow, not many different objects.

W DIGITAL · 2010-10-07

ok, now that works

but when i do file type, ObjExp

it says on each frame while exporting, cannot determine file type and then it doesnt write anything

Ok try the new version...

Anton Berg · 2010-10-07

try the new version v11

W DIGITAL · 2010-10-07

hi, great script but i cant use it, hitting -browse output path
does not allow me to select a directory, and so i cant export animated objects
thanks for the help

I think I found it... download version 1.0 instead

Anton Berg · 2010-10-07

I think I found the bug, download the new version instead

Anton Berg · 2009-10-11

Yes it seems like the ASE format doesnt work properly. I unfortunally can not find a way to control the settings in the interfaces for every plugin that opens since those have not been exposed to maxscript (which is a big pity).

So I really cant think of any way to fix this now. But if someone reads this and knows a way, please tell me!´

I know that one could write a totally new ASE exporter totally written in maxscript, but I dont have the knowledge or time to do this now!

horo · 2009-10-15

I think i found a workaround way.
U can affect the export with the Animation slider "Start Time"

maybe possible?

horo · 2009-10-11

thx - group feature works -D

would be nice if i could export ase though, looks like he´s only exporting frame 0 for all files.

i guess it has something to do with the global settings from the export popup.

Anton Berg · 2009-10-08

I have updated the script so it only exports one file for every group. Test and get back to me if it doesnt work.

Regarding "save as older max version", this is unfortunally very far from this script and much harder to do. If it were possible to store a maxfile in a Ascii format then I guess it would be possible to do some workarounds like you can do in Maya. But as far as I know it is not possible to store the native maxfile in anyting other than binary..

But I would be very glad if someone proved me wrong since it would be a function that I too have wanted for a long time.

OgmaSoul3D
Anton Berg
anton[at]os3d.se

jinj · 2009-10-07

hi, nice script.
would it be possible to ad a function like " save as *.max for older max version? example from 2009 to 2008 or to max7
jinj

Anton Berg · 2009-09-24

hmm interesting.... I will see if I can make the group option. I really hate the group support in maxscript. I am looking forward to the new container functions that will hopefully solve a lot of the group problems max have today..

Just to be clear, you mean like this:
I have for example a group where all the parts of the groups are individually animated.

Select the group and press export 100 frames. You will only get 100 files with all the parts in that group in one file.

OgmaSoul3D
Anton Berg
anton[at]os3d.se

asylum · 2009-10-07

Yes exactly... I am really hoping this script is ready soon.. it will be a life saver.. especially for the game devs out there..

Asylum

horo · 2009-09-24

n1 script -D

maybe add group support? like i have an animation of 100 frames = 100 files