export selected

I'd like to export selected mesh from 3dmax into 3ds format to use later on as morph targets.
The problem is that mesh is animated for example 800 frames of constant changes and i'd like to export say every fourth frame from 1 to 400 and name them: catjump001, catjump002 etc.

If i do it manually it is 100 export operations with changing numbers each time so i decided to post here, maybe someone can help me with this (i have also dog and chicken and other animals to export the same way:).

Am I good scripter? No. I wrote only one script in my life! (scales object 10%)
I tried to edit "mondo exporter" script with no sucsess.

Thanks for any comment.



Comment viewing options

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

theClasses =

theClasses = exporterPlugin.classes
for i=animationRange.start to animationRange.end by 4f do
exportFile (GetDir #scene + "/exportTest"+(i as string)) #noprompt selectedOnly:true using:theClasses[1]

Amstia's picture

Thank you for quick answer.

Thank you for quick answer. I am suprised!
Tried your script and it works!!!!
well it have to :)


take a look what i did today:


savesequence "Framex"

label l01

"select frames:"
spinner start

"From:" type:#integer range:[0,1000,animationrange.start]
spinner end

"To:" type:#integer range:[0,1000,200] --animationrange.end]
label l02

" "
spinner every

"every nth frame:" type:#integer range:[0,10,4]
label l03

"mesh name:"
edittext mesh_name

" " text:"cat"
button export


export pressed do
(theClasses = exporterPlugin.classes


i=animationrange.start to animationrange.end do



exportFile (GetDir #export +

"/cat"+(i as string)) #noprompt using:theClasses[1]


I did sort of interface ;), found what does your script do and would ask you for help once again. What i don't understand is from where it returns in exported mesh letter "f" after framenumber, and how fully integrate your code with spinners?

Huge thanx!

Regards Amstia

Amstia's picture

--After some

--After some research....
--and with lechoo's help ;)

utility savesequence "ver 14"
label l01
"select frames:"
spinner RangeStart_Spn
"From:" type:#integer range:[0,1000,0]
spinner RangeEnd_Spn
"To:" type:#integer range:[0,1000,208]
label l02
" "
spinner RangeStep_Spn
"every nth frame:" type:#integer range:[0,50,50]
label l03
edittext MeshName_Txt
" " text:"C:\morph\mymesh"
button export
on export pressed do
strBaseName = MeshName_Txt.text
escapeEnable = true
progressStart "exporting..."
animationRange = interval RangeStart_Spn.value RangeEnd_Spn.value
for tmCounter = animationRange.start to animationRange.end by RangeStep_Spn.value
sliderTime = tmCounter
offset = (tmCounter - animationRange.start) as float
total = (animationRange.end - animationRange.start) as float
progressUpdate (offset / total * 100)
iDigit10 = iFrame/10
iDigit1 = (mod iFrame 10) as integer
str = strBaseName + (iDigit10 as string) + (iDigit1 as string) + ".3ds"
if getProgressCancel() then exit
exportFile str #noprompt selectedOnly:true
iFrame = iFrame + 1


--I learned a lot!
--Thanks for help!


Comment viewing options

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