ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
First line of code is just for example. Will create five box in the row with distance of 30 units.
U can use your list of objects. Select objects in the scene and run this line:
--store your selection in array
listOfObj = selection as array
Last line is function for exporting.
For that function you need defined path where object will be exported (exportpath)
Then you need export class (in this case "ObjExp") and selectedonly argument must be on ei. true. If not then yoyu will be export whole scene
first run this in listener to see all export classes that max suports for i in exporterPlugin.classes doprint i
You will get then en array.
Let say that you want to export to *.obj list of objects.
-- this is my list of boxes
listOfObj = for i = 1 to 5 collect (Box pos:[0,i*30,0])
exportpath = @"c:\temp"--now if you want to expor only selection (not whole scene) then
select listOfObj
exportFile exportpath using:ObjExp selectedonly:on
Comments
First line of code is just
First line of code is just for example. Will create five box in the row with distance of 30 units.
U can use your list of objects. Select objects in the scene and run this line:
Last line is function for exporting.
For that function you need defined path where object will be exported (exportpath)
Then you need export class (in this case "ObjExp") and selectedonly argument must be on ei. true. If not then yoyu will be export whole scene
bga
Ive put in my export path but
Ive put in my export path but when i export it to the chose place it doesn't show up there..
Does it export as a list?
basic forum rule
You need to post some code or snapshot or even test file first.
bga
Ye sorry thought i had
Ye sorry thought i had done..
My code looks like this
button exportobjects "Export Selected Objects"
on exportobjects pressed do
(
listOfObj = selection as array
exportpath = @"C:\Users\Michael\Documents\3dsMax\export"
select listOfObj
exportFile exportpath using:ObjExp selectedonly:on
)
Probably UAC block exporting.
Probably UAC block exporting. If you have windows8 than this is common problem.
Also you need error check
More elegant solution you can find here http://www.scriptspot.com/3ds-max/scripts/batch-exportimport
bga
Cool
Hello
Thanks for that... Could you explain what the first bit of code does and what the final line does..
Cant get my head round it???
first run this in listener to
first run this in listener to see all export classes that max suports
for i in exporterPlugin.classes do print i
You will get then en array.
Let say that you want to export to *.obj list of objects.
bga