PDA

View Full Version : killing deadframes automatically


biggyninja
04-30-2009, 10:29 AM
Hi guys, this is my problem. Ive set up a simple script which imports fbx files from a directory and exports them wholesale into our engine through maxscript.

Only problem is there is an irksome bug when you import from motionbuilder and that is sometimes you have to delete 'dead' keyframes at the end of the file. (Ie the animation goes for 30 frames but max imports it in as 50 frames).

Basically what I would like is some way to check an object (eg bone_hips) and change the slidertime to correspond to the last keyframe of that object.

thanks guys.

Kameleon
04-30-2009, 11:16 AM
Would this do?

max select all
theSel=(selection as array)[1]
lFrame=getKeyTime theSel.position.controller theSel.position.controller.keys.count
animationrange=interval animationrange.start lFrame

If you have the same object name in all files you can change to the name of that object. Cheers.

biggyninja
04-30-2009, 12:27 PM
thats awesome, thank kameleon. Im at home right now, but ill try it in the morning!

CGTalk Moderation
04-30-2009, 12:27 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.