0
$\begingroup$

I would like to keyframe the bevel_depth property of hundreds of curves. Therefore, I wanted to use the Python interface like so:

for sel in bpy.context.selected_objects:
    sel.keyframe_insert(data_path="bevel_depth",index=-1,frame=60)

Unfortunately, this does not work and results in the error

TypeError: bpy_struct.keyframe_insert() property "bevel_depth" not found

I can manually keyframe the bevel_depth property by hovering the mouse on the property and pressing "i" but this is not feasible for hundreds of curves. What's the correct data_path for the bevel_depth property?

$\endgroup$
0
$\begingroup$

Okay I think I found my mistake. Sorry for bothering you. It seems I have to keyframe the data of the curve:

for sel in bpy.context.selected_objects:
    sel.data.keyframe_insert(data_path="bevel_depth",index=-1,frame=60)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.