Notifications
Clear all

[Closed] filename to include number of frames

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

8 Replies

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

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

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

totalFrames = (animationrange.end.frame – animationrange.start.frame) as integer

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”

 rdg

[i]

“– unable to convert: 31 to type: string”

if you need a string then you should change integer to string:

[/i]

totalFrames = (animationrange.end.frame - animationrange.start.frame) as string


Georg

totalFrames = ((animationrange.end.frame – animationrange.start.frame) as integer) as string

  • Martijn

cheers guys, thats gonna save me and my mates loads of time, if i could kiss you all i would!!