Multi-Objects: POSELIB_OT_pose_add
authorDalai Felinto <dfelinto@gmail.com>
Fri, 12 Oct 2018 22:51:11 +0000 (19:51 -0300)
committerDalai Felinto <dfelinto@gmail.com>
Fri, 12 Oct 2018 22:51:11 +0000 (19:51 -0300)
Make it work only for the active object bones

release/scripts/startup/keyingsets_builtins.py

index 09b2f9cd430d14e9be51b8a2b9c8ddd5def54a27..829473aa682211fc97206374f3748492c58953b6 100644 (file)
@@ -538,7 +538,7 @@ class BUILTIN_KSI_WholeCharacterSelected(KeyingSetInfo):
     # iterator - all bones regardless of selection
     def iterator(ksi, context, ks):
         # Use either the selected bones, or all of them if none are selected.
-        bones = context.selected_pose_bones or context.active_object.pose.bones
+        bones = [b for b in context.active_object.pose.bones if b.bone.select] or context.active_object.pose.bones
 
         for bone in bones:
             if bone.name.startswith(BUILTIN_KSI_WholeCharacter.badBonePrefixes):