Need help: In changing the default export folder

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jesster's picture

Nope this is not working for

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's picture

Try this  ( fn

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 

 

Proud to be a PAKISTANI.

Jesster's picture

This did not work for me,

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

mobeen's picture

If you want to use the above

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

Proud to be a PAKISTANI.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.