diff options
-rw-r--r-- | release/scripts/startup/keyingsets_builtins.py | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 8 |
2 files changed, 12 insertions, 8 deletions
diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py index 0775d38c437..8cb63ea48cf 100644 --- a/release/scripts/startup/keyingsets_builtins.py +++ b/release/scripts/startup/keyingsets_builtins.py @@ -215,10 +215,14 @@ class BUILTIN_KSI_VisualLocRot(bpy.types.KeyingSetInfo): class BUILTIN_KSI_Available(bpy.types.KeyingSetInfo): bl_label = "Available" - # poll - use predefined callback for selected objects - # TODO: this should really check whether the selected object (or datablock) - # has any animation data defined yet - poll = keyingsets_utils.RKS_POLL_selected_objects + # poll - selected objects or selected object with animation data + def poll(ksi, context): + ob = context.active_object + if ob: + # TODO: this fails if one animation-less object is active, but many others are selected + return ob.animation_data and ob.animation_data.action + else: + return bool(context.selected_objects) # iterator - use callback for selected bones/objects iterator = keyingsets_utils.RKS_ITER_selected_item diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index ddfa738449d..a0511f5da2e 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1226,10 +1226,10 @@ void pchan_apply_mat4(bPoseChannel *pchan, float mat[][4], short use_compat) */ void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float arm_mat[][4]) { - float imat[4][4]; - - invert_m4_m4(imat, arm_mat); - mul_m4_m4m4(delta_mat, pose_mat, imat); + float imat[4][4]; + + invert_m4_m4(imat, arm_mat); + mul_m4_m4m4(delta_mat, pose_mat, imat); } /* **************** Rotation Mode Conversions ****************************** */ |