[SOLVED] How to insert keyframe with BPY for an Armory Prop

I have a number of Armory properties in Blender:

I want to set a keyframe on each of these properties from a python script but cant find what to fill in the data_path argument.
I’ve tried:

  • bpy.data.objects[‘Build Plate 1’].keyframe_insert(data_path=“["arm_propertylist[1].boolean_prop"]”, frame=10)
    but also first getting the property:
    prop = bpy.data.objects[‘Build Plate 1’].arm_propertylist[1]
    and next using that keyframe_insert method:
  • prop.keyframe_insert(data_path=“[arm_propertylist[0].boolean_prop]”, frame=50)
    as well as
  • prop.keyframe_insert(data_path=“["BPHT"]”, frame=50)
    neither work.
    What should I use as data_path?

I believe this should be:

bpy.data.objects['Build Plate 1'].keyframe_insert(data_path="arm_propertylist[1].boolean_prop", frame=10)

Yes that works
Many thanks!

No problem. Glad I could help. :slightly_smiling_face: