diff options
Diffstat (limited to 'release/scripts/startup/keyingsets_builtins.py')
-rw-r--r-- | release/scripts/startup/keyingsets_builtins.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py index 6d52a81456b..195eaf823f4 100644 --- a/release/scripts/startup/keyingsets_builtins.py +++ b/release/scripts/startup/keyingsets_builtins.py @@ -175,6 +175,22 @@ class BUILTIN_KSI_RotScale(KeyingSetInfo): # ------------ +# Bendy Bones +class BUILTIN_KSI_BendyBones(KeyingSetInfo): + """Insert a keyframe for each of the BBone shape properties""" + bl_label = "BBone Shape" + + # poll - use callback for selected bones + poll = keyingsets_utils.RKS_POLL_selected_bones + + # iterator - use callback for selected bones + iterator = keyingsets_utils.RKS_ITER_selected_bones + + # generator - use generator for bendy bone properties + generate = keyingsets_utils.RKS_GEN_bendy_bones + +# ------------ + # VisualLocation class BUILTIN_KSI_VisualLoc(KeyingSetInfo): @@ -387,6 +403,9 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo): ksi.doRot3d(ks, bone) ksi.doScale(ks, bone) + # bbone properties? + ksi.doBBone(context, ks, bone) + # custom props? ksi.doCustomProps(ks, bone) @@ -466,6 +485,19 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo): # ---------------- + # bendy bone properties + def doBBone(ksi, context, ks, pchan): + bone = pchan.bone + + # This check is crude, but is the best we can do for now + # It simply adds all of these if the bbone has segments + # (and the bone is a control bone). This may lead to some + # false positives... + if bone.bbone_segments > 1: + keyingsets_utils.RKS_GEN_bendy_bones(ksi, context, ks, pchan) + + # ---------------- + # custom properties def doCustomProps(ksi, ks, bone): |