View Full Version : filename to include number of frames
biggyninja 04-04-2006, 08:47 AM Hi guys, Im currently batching fbx files thru max via a maxscript and one thing which would be really handy is if the maxfilename included the framelength in it, as sometimes i need to know this, for programmers, but because i batch about 30 - 50 files in one go its impractible to open all the max files and find out that way.
Very thankful for the reply
|
|
Dave_Hingley
04-04-2006, 11:33 AM
ok
to return the correct number of frames i use this:
totalframes = animationrange.end as float / ticksperframe
now simply concatenate this string onto the currently open .max file name
and when exporting export to this file name
magicm
04-04-2006, 12:09 PM
Afaik, the only info you can get out of maxfile through maxscript is the list of object that are in the file. So I'm affraid there's no other way than to open each file and check the animationrange per file..
Martijn
Aearon
04-04-2006, 01:58 PM
may i ask how you import/export fbx files without having the corresonding max file open anyway?
i'd do this the way dave suggested, only you probably want to use 'as integer' instead of float
magicm
04-04-2006, 02:28 PM
totalFrames = (animationrange.end.frame - animationrange.start.frame) as integer
biggyninja
04-05-2006, 04:18 AM
Hi guys thanks for the help, um yeah, basically i have max open when i run the script.
I tried putting that line it but i came up with this error:
"-- unable to convert: 31 to type: string"
"-- unable to convert: 31 to type: string"
if you need a string then you should change integer to string:
totalFrames = (animationrange.end.frame - animationrange.start.frame) as string
Georg
magicm
04-05-2006, 10:31 AM
totalFrames = ((animationrange.end.frame - animationrange.start.frame) as integer) as string
- Martijn
biggyninja
04-05-2006, 12:09 PM
cheers guys, thats gonna save me and my mates loads of time, if i could kiss you all i would!!
CGTalk Moderation
04-05-2006, 12:09 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.