# Scale keyframes for multiple objects with a script

I have N objects in a scene and each has baked keyframes on some frame_start, frame_end interval.

Can anyone help me to write a script to scale keyframes for all of the objects along x axis and set interpolation type to constant. I cannot find an appropriate function to scale that programmatically.

thanks

• Can I just ask, are you asking for a scripted solution because you specifically want to script it or because you don't know of a way to do it via the interface? – Ray Mairlot Aug 8 '14 at 16:06
• Because i specifically want to script it. – Blaz Bratanic Aug 8 '14 at 17:01

old_type = bpy.context.area.type