XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : batch exporter-help wanted !

02-12-2004, 11:24 AM
I got a scene with many objets.I need to export each of them individualy in W3D with the name they got in the scene.
(exemple: box1, box2 of the scene will do box1.w3d and box2.w3d)

I only found a script that batch export with the max file name
and I don't speak any words from the planet maxscipt !<://
waiting for your good advices !


02-12-2004, 04:18 PM
try this:

outputPath = getSavePath "Save to:"
if (outputPath != undefined) do for obj in objects do exportFile (outputPath + "\\" + obj.name + ".w3d") #noPrompt

02-12-2004, 05:28 PM
It seam to not work ://
here's where I am:
this work. I unhide object one by one and i just press the "créer un W3d" and its ok!!
Now, I'd like to automate the process that it export each object in the scene alone!

utility massexport "FOREGE Xporter"
bitmap logo filename:"forege.bmp"
button doit "créer un W3d"
on doit pressed do
filename = getopenfilename types:"MAX(*.max)|*.max"
max hide inv --hide unselected obj

--objName = selection.obj.name
for ob in selection do
objName = ob.name
exportfile ((getfilenamepath filename) + (objName) + ".w3d") #noPrompt

02-12-2004, 05:42 PM
oh, sorry, i just forgot that exportFile exports the complete scene, so you should put a 'Select ob' before the exportFile in your loop and add the parameter 'selectedOnly:TRUE' to the exportFile command. this should do it, and then there is no need to hide/unhide the objects anymore.. i hope i haven't overseen something else ;)

02-12-2004, 05:56 PM
just tested this, seems to work correctly...

outputpath = getSavePath "Save to:"

if (outputPath != undefined) do
objList = getCurrentSelection()
for o=1 to objList.count do
exportName = outputPath + "\\" + objList[o].name + ".w3d"
select objList[o]
exportfile exportName #noPrompt selectedOnly:TRUE

CGTalk Moderation
01-17-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.