[Closed] Exporting many objects each to separate file?
Hi!
I have a newbie question about maxscript.
I’m trying to write a very simple script. I want to export all the objects in my scene to separate files in obj format. the reason is that if I put many objects it becomes too heavy and the exporter destroy my mesh.
So I thought it would go like this:
i select all my objects et execute:
for i in selection do
(
max file export selected
)
But this gives me the unexpected result of exporting many files containing all my objects in each of them (each obj file contains ALL the object instead of just one…)
thanx in advance for helping
try it like this
for i in selection do
(
max file export i
)
little typo.
cheers,
Los.
Carlos’ script would work, but it would be a real pain for exporting more than a few objects, having to type in a filename for each one. If you’re dealing with more than a few objects (with unique names), you might try:
exportArray = $ as array
for obj in exportArray do
(
select obj
exportFile (obj.name + “.OBJ”) #noPrompt selectedOnly:true
)
like I said, they must have unique names to work, otherwise you’ll just be overwriting some. however, some renaming could be easily done if you don’t have unique names.