Page 1 of 1

3dsmax script to batch export animation v0.1a

Posted: Fri Apr 09, 2010 11:53 pm
by [gk]
I have to post it here since I cant post in tutorial section anymore.

(
oldSelection = selection as array
setObjParams = false

for f = (startFrame = 0f) to (endFrame = 5f) by (frameStep = 1f) do (
sliderTime = f
for i = 1 to oldSelection.count do (
o = oldSelection
select o
outName = ("C:\\Users\\name\\Desktop\\test\\" + o.name + "_" + f as string + ".obj")
if (not setObjParams) then (
exportFile outName selectedOnly:true
setObjParams = true
)
else ( exportFile outName #noPrompt selectedOnly:true )
) -- obj loop
) -- anim loop
select oldSelection
)



fire this one up and export sequences, dont need to bake trajectory.

2 notes for people who doesnt know alot about scripting.

you need to modify the script 2 places.
first place :
for f = (startFrame = 0f) to (endFrame = 5f) by (frameStep = 1f) do (
change 0f and 5f to your selected place on time line, the template exports frame 0-5..should be logic
second place :
outName = ("C:\\Users\\name\\Desktop\\test\\" + o.name + "_" + f as string + ".obj")
Change url to your own, remember \\ instead of a single \ to define paths..


-mads

Re: 3dsmax script to batch export animation v0.1a

Posted: Sat Apr 10, 2010 1:20 am
by [gk]
updated :

Now it exports the entire scene, as long as its selected before you run script..
before it grabed all objects independantly.


(
oldSelection = selection as array
setObjParams = false

for f = (startFrame = 0f) to (endFrame = 5f) by (frameStep = 1f) do (
sliderTime = f
outName = ("C:\\Users\\stuff\\Desktop\\test\\" + "_" + f as string + ".obj")
if (not setObjParams) then (
exportFile outName selectedOnly:true
setObjParams = true
)
else ( exportFile outName #noPrompt selectedOnly:true )
) -- anim loop
)

Re: 3dsmax script to batch export animation v0.1a

Posted: Sat Apr 10, 2010 7:45 am
by radiance
thanks,

i'll be adding flags to automate octane partly to do stuff like this,
so you might want to update it and post it again with those new auto start options, after 2.1 is released.

Radiance

Re: 3dsmax script to batch export animation v0.1a

Posted: Sat Apr 10, 2010 11:17 am
by [gk]
alright

Re: 3dsmax script to batch export animation v0.1a

Posted: Thu May 06, 2010 3:59 pm
by franklau
hi first of all gk thank you for provide the batch export script, but i have a question can you please explain the procedure to render through the batch or i have to do it individually.

Re: 3dsmax script to batch export animation v0.1a

Posted: Thu May 06, 2010 4:11 pm
by radiance
franklau wrote:hi first of all gk thank you for provide the batch export script, but i have a question can you please explain the procedure to render through the batch or i have to do it individually.
i recommend you wait till we have released 2.2.
it will come with easy to use scripts/plugins for max, no scripting required.

Radiance