Scripting examples for 2.5 - update: Mar 26th 2010

To expand on taniwha’s method: you can also use the keyframe_insert-method of StructRNA to create new keyframes for properties. I this this is less arcane than relying on the type-parameter in the keyframe_insert_menu-method :slight_smile:

The above snippet will make the cube visible on the second layer for frames 10-19. You can use keyframe_insert for every property of the StructRNA this method is called on. I suspect the same is true for the driver_add-method, although I have not experimented with that method.