PDA

View Full Version : export all frame in multiple object


paolopix
04-30-2010, 05:25 PM
hi,
I need to export to x (with plugin pandasoft: Pandasoft (http://www.andytather.co.uk/Panda/directxmax_downloads.aspx)) animation made in 3dsmax, but I need that if there are 100 frames I export 100 3D objects in various different positions.
I'm going to go out of frame and choose Export to file format and give the name with consecutive numbering, but this looks crazy with many frames.
perhaps you can create a script to do it automatically, and how?

Thanks to all.

lo
05-01-2010, 09:38 PM
Here you go, this should do the trick. currently works on 1 object. currently set to export to .obj. To find out the name of the panda exporter class, type "exporterPlugin.classes" in the maxscript listener (without the quotes) and find the name. Then use that name in this script instead of "objExp".
Of course, also change the output path and frame range according to your needs.

The script will ask you to input export settings once and then use those settings for all frames.


---USER PARAMETERS----
thepath=@"D:\test\"
startframe=1
endframe=200
exporter=objExp
-------------------------

theobj=selection[1]
for i = startframe to endframe do
(
framestring=i as string
if framestring.count==2 then framestring="0"+framestring
if framestring.count==1 then framestring="00"+framestring
outputfile=thepath+theobj.name+"_f"+framestring+".obj"
sliderTime=i
if (i==startframe) then
(
exportfile outputfile selectedOnly:true using:exporter
)
else
(
exportfile outputfile #noPrompt selectedOnly:true using:exporter
)
)

denisT
05-02-2010, 10:46 AM
framestring = i as string
if framestring.count==2 then framestring="0"+framestring
if framestring.count==1 then framestring="00"+framestring

Equals to

framestring = formattedPrint i format:"03d"

lo
05-02-2010, 10:54 AM
Thanks, Dennis. I suspected there is a more elegant way to do that :)

paolopix
05-02-2010, 02:51 PM
compliments is just what I needed, but I only export the selected object and not everyone in the scene. which is a way to export the entire scene?
Anyway congratulations and thank you very much.

lo
05-02-2010, 03:00 PM
---USER PARAMETERS----
thepath=@"D:\test\"
startframe=1
endframe=200
exporter=objExp
file_extension:".obj"
-------------------------

for i = startframe to endframe do
(
framestring = formattedPrint i format:"03d"
outputfile=thepath+theobj.name+"_f"+framestring+file_extenstion
sliderTime=i
if (i==startframe) then
(
exportfile outputfile selectedOnly:false using:exporter
)
else
(
exportfile outputfile #noPrompt selectedOnly:false using:exporter
)
)


try this. I don't know what panda is so no idea if it will work or not.

CGTalk Moderation
05-02-2010, 03:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.