I am writing a script where I want to automate the animation of Shapekeys. I tried to use the following command:
obj1.keyframe_insert(data_path = 'eval_time')
, obj1
is the object containing the Shape Keys.
The command should add a keyframe to the "Evaluation Time" setting for the absoulte Shape-Key:
'eval_time'
is the data path I have copied via the command "Copy Data Path":
However, I get the following message in the system console.
TypeError: bpy_struct.keyframe_insert() property "eval_time" not found
Using other data-paths like 'scale'
or 'rotation_euler'
works just fine, 'eval_time'
fails, however.
Since this reference I seek to get is nested I have also tried the command using the full ID-path:
obj1.keyframe_insert(data_path = "bpy.data.shape_keys['Key.002'].eval_time")
, but that didn't work out either.
Can anybody help me out how I can add a keyframe to the "Evaluation Time" attribute using the python API?
Thank you very much in advance.