Notifications
Clear all

[Closed] killing deadframes automatically

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.

2 Replies

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.

thats awesome, thank kameleon. Im at home right now, but ill try it in the morning!