ScriptSpot

Forum topic · Scripts Wanted

Need help: In changing the default export folder

By Jesster · 2007-06-25

Description

Hey All, 

 

What code (below) needs to be added to get my exported model to use the same folder that the 3Ds Max 9 model folder; in stead of the default Max export folder?

 

From this: My Documents\3dsmax\export

To Say this: \My Documents\3D Car Game\Models\Cars\Cool Car 01\Cool_Car_01.max

 

Thanks :-)

 

(

fn ExportSelectionToASE suffix =

(

try(

local sel = (selection as array)

if sel.count < 1 then return false

)catch(return false)

clearselection()

for i = 1 to sel.count do (

select sel[i]

local n = sel[i].name + suffix + ".ase"

format "n = %\n" n

exportFile n #noprompt selectedOnly:true

)

true

)

ExportSelectionToASE ""

)

 

 

Comments (4)

Jesster · 2007-09-27

Nope this is not working for me. It is still just exporting to "\My Documents\3dsmax\export" folder not the "C:\Cool Car folder"

Thanks for your help on this.

mobeen · 2007-07-05

Try this


(

fn ExportSelectionToASE prefix suffix =

(

try(

local sel = (selection as array)

if sel.count < 1 then return false

)catch(return false)

clearselection()

for i = 1 to sel.count do (

select sel[i]

local n = prefix +"\\"+ sel[i].name + suffix + ".ase"

format "n = %\n" n

exportFile n #noprompt selectedOnly:true

)

true

)

ExportSelectionToASE "C:\\Temp\\CoolCar" ""

)


Hope this helps

Mobeen

 

Jesster · 2007-07-05

This did not work for me, did it work for you?

mobeen · 2007-07-06

If you want to use the above code as is

PLease make sure that the folder where you are dumping the file into exists already otherwise it wont work.

OR

Add this line after clearselection()

makedir prefix