Notifications
Clear all

[Closed] Batch convert .max to .3ds?

This question probably gets asked all the time but I’m a scripting noob and was wondering if there’s a way to batch convert multiple simple .max files with just objects into .3ds files? Thanks in advance.

11 Replies

I’m not sure what you mean by “with just objects”. In any case what you are going to need to do is collect are the desired files in an array, and then use the methods described in the “3ds Max File Loading and Saving” topic in the reference.

3 Replies
(@neuropolis)
Joined: 11 months ago

Posts: 0

What I mean is a max file can contain UV mapping, animation, lighting. A 3ds file is just an object. So it seems to me that writing a script to automate object conversion across several max files would be more complicated than it sounds.

I’m not familiar with the concept of files in an array but I’ll check out that topic in the reference, thank you.

Downloaded and messing with it now. This automates existing scripts and applies them across multiple files, correct? May just be what I’m looking for.

(@marcobrunetta)
Joined: 11 months ago

Posts: 0

Hum, you don’t need to create an exporter, you just use the 3ds exporter already in MAX, that will take care of sorting what can and cannot be exported. All you need to do is create a script that will:

find all the files on a given directory
open the first file
export to 3ds
open the next one
export to 3ds
etc etc

(@neuropolis)
Joined: 11 months ago

Posts: 0

Oh, I already get that. It’s writing the script I’m worried about.

And I’m realizing by now that my concerns about complexity between formats were unfounded and just needlessly complicated things. I’ve never had to export to .3DS before, just OBJ, which ignores all non-mesh information in the export. I don’t know why I thought this was relevant. I think I pretty much get what needs to happen now and it shouldn’t be too difficult.

All you need to do is create a script that will:

find all the files on a given directory
open the first file
export to 3ds
open the next one
export to 3ds
etc etc
So far, I’ve managed to write a script that does a simple export, no problem. It’s just the same exact function as “File>Export.” But then I have to choose a filename and format manually. If I can just get the script to automatically create a 3DS file and name it after the MAX file, then I’m aces.

I’d say look up batch it max by paul, and write a script with something like “select objects, exportfile path + maxfilename + “.3ds”

it’d be something like this…


(
	local dir = getSavePath "Pick a folder with .max files to convert to .3ds" initialDir:(getDir #scene)
	undefined
	if (dir != undefined) do (
		local files = getFiles (dir + "\\*.max")
		if (files.count > 0) do (
			if (queryBox ("About to convert " + files.count as string + " .max files to .3ds.

Continue?") title:"Continue conversion?") do (
				for f in files do (
					if (keyboard.escPressed) do (
						if (queryBox "Abort processing?") do ( exit )
					)
					loadMaxFile f useFileUnits:true quiet:true
					exportFile ((getFileNamePath f) + (getFileNameFile f) + ".3ds") #noprompt
				)
			)
		)
	)
)

The green lines are the important ones that you could use in batchItMax (which takes care of sequentially loading the files, etc).

I have a utility that should do what you want

www.joshuanewman.net/scripts/download/JNimportV1.4.zip

J.

 PEN

As was mentioned you can use this
http://www.paulneale.com/scripts/batchItMax/batchItMax.htm

and thenthen all you need to do is have a script to call from it. That script might look some thing like this.

exportFile (maxFilePath+"\\"+(getFilenameFile maxFileName)+".3ds") #noPrompt using:exporterPlugin.classes[1]

IN the Batch It Max ui at the top turn on “Don’t Save Files” so that it isn’t wasting time on the saving of the Max file. If you have any problems with Batch It Max please let me know.

I was having problems opening vray max files… i dont have vray…
how to ovverride warning messeges and export 3ds and and obj both formats

thank you…

1 Reply
(@zeboxx2)
Joined: 11 months ago

Posts: 0

Option A: Get V-Ray. There’s both free and demo versions available that would probably allow you to load the files without warnings.

Option B: Specify quiet mode when using loadMaxFile:

loadMaxFile @"c:\path\file.max" quiet:true

If you want to store lists of missing plugins/maps/xrefs, you can use:

loadMaxFile @"c:\gemology\gemology.max" quiet:true \
 	missingExtFilesAction:#logmsg missingExtFilesList:&missingExtFiles \
 	missingDLLsAction:#logmsg missingDLLsList:&missingDLLs \
 	missingXRefsAction:#logmsg missingXRefsList:&missingXRefs
 

The variable ‘missingXRefs’ would then contain an array of the missing XRefs, for example.

exporting 3ds is already discussed here, I think obj was as well – try a forum search otherwise. In short, though:

exportFile @"c:\path\somefile.obj" #noPrompt

#noPrompt prevents the UI dialog from poping up. The first file you export you might want to leave out the #noPrompt so that you can adjust exporter settings.

this works with 3ds only

exportFile (maxFilePath+"\\"+(getFilenameFile maxFileName)+".3ds") #noPrompt using:exporterPlugin.classes[1]

its not working with obj, how can i export to obj using BatchItMax?

and can i set some sttings? im a modo user.

and i downloaded a trial of 3ds max to batch convert max to obj

any help is greatly appreciated