Last Frame number

I want to know if it is possible to get, to recuperate the number of the last frame in a scene. I want to do this with a mel command....

Thank you

TonyBoy

playbackOptions should let you know, range or whole animation (not sure if you can globally query for the last keyframe).

I had to do this very thing this afternoon, so here it is:

	int $startFrame = `floatFieldGrp -q -v1 startFrame`;
	int $endFrame   = `floatFieldGrp -q -v1 endFrame`;
	int $frameStep  = `floatFieldGrp -q -v1 frameStep`;

	int $numbOfFrames = (($endFrame - $startFrame) / $frameStep);
	int $lastFrameNumb = ($startFrame + ($numbOfFrames * $frameStep));

	print $lastFrameNumb;

This is assuming you want the render globals last frame. It would be easier just to query the gui if that is what you are looking for.

BTW , you need to source (or just open the panel) the render globals panel.

Hope it helps...

Thank you for your help.....
It works well and I learn a new mel command