From ebc44aae9897607a7d19a642d1a2fdffa2b24400 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sat, 11 May 2019 21:16:46 +0300 Subject: Python API: expose more keyframing flags for use in keyframe_insert. Expose REPLACE and CYCLE_AWARE, and add AVAILABLE for completeness. These flags are generic and safe to use, and necessary to match the behavior of certain UI options. --- source/blender/python/intern/bpy_rna_anim.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/blender/python/intern/bpy_rna_anim.c') diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c index 79c31c8caad..710ae0433e0 100644 --- a/source/blender/python/intern/bpy_rna_anim.c +++ b/source/blender/python/intern/bpy_rna_anim.c @@ -263,8 +263,9 @@ static int pyrna_struct_keyframe_parse(PointerRNA *ptr, /* flag may be null (no option currently for remove keyframes e.g.). */ if (r_options) { - if (pyoptions && (pyrna_set_to_enum_bitfield( - rna_enum_keying_flag_items, pyoptions, r_options, error_prefix) == -1)) { + if (pyoptions && + (pyrna_set_to_enum_bitfield( + rna_enum_keying_flag_items_api, pyoptions, r_options, error_prefix) == -1)) { return -1; } @@ -299,8 +300,11 @@ char pyrna_struct_keyframe_insert_doc[] = "F-Curves.\n" " - ``INSERTKEY_VISUAL`` Insert keyframes based on 'visual transforms'.\n" " - ``INSERTKEY_XYZ_TO_RGB`` Color for newly added transformation F-Curves (Location, " - "Rotation, Scale)\n" - " and also Color is based on the transform axis.\n" + "Rotation, Scale) is based on the transform axis.\n" + " - ``INSERTKEY_REPLACE`` Only replace already exising keyframes.\n" + " - ``INSERTKEY_AVAILABLE`` Only insert into already existing F-Curves.\n" + " - ``INSERTKEY_CYCLE_AWARE`` Take cyclic extrapolation into account " + "(Cycle-Aware Keying option).\n" " :type flag: set\n" " :return: Success of keyframe insertion.\n" " :rtype: boolean\n"; -- cgit v1.2.3