ScriptSpot

Forum topic · Scripts Wanted

Export 3ds Frames

By mid.night13 · 2011-08-27

Description

I've already searched for this and I haven't been able to find what I am looking for; one that I thought would work, didn't export properly. I need help and would like the following:

I need a script that will export all of the frames of animation as separate .3ds files so that I can import them into another 3d model program as individual frames. Exporting with a macro is getting to be a pain.

Comments (1)

try this

Anubis · 2011-08-27

-- function
fn Export3dsSeq objs range = (
	local dir = GetDir #export + "\\"
	local oldSel = getCurrentSelection()
	local fname, fid
	for obj in objs do (
		select obj
		fname = obj.name
		for f = range.start to range.end do (
			sliderTime = f
			fid = formattedPrint (f as integer) format:"04d"
			exportFile (dir + fname + fid + ".3ds") #noPrompt selectedOnly:on
		)
	)
	if oldSel.count > 0 do select oldSel
)

-- example usage:
Export3dsSeq selection (interval 20 100)
Export3dsSeq selection animationRange