I'm writing a python script for animation in Blender and I'm looking for a way to insert keyframes automatically.
So far I have:
import bpy import mathutils as m import math import random armature = bpy.data.objects['Armature'] curves = armature.animation_data.action.fcurves def add_curve(): action = bpy.data.actions.new(name = 'Test') curves = action.fcurves keyframes = [0,10,30] # defining keyframes for insertion for c in curves: for k in keyframes: c.keyframe_insert( data_path = ??) # Is there another method ?