From e18091650b92ee88339d1c8032572dabce21362a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 26 Mar 2021 13:12:56 +1100 Subject: Animation: action mirror RNA API using pose contents This adds a new RNA method `Action.flip_with_pose(ob)` to flip the action channels that control a pose. The rest-pose is used to properly flip the bones transformation. This is useful as a way to flip actions used in pose libraries, so the same action need not be included for each side. Reviewed By: sybren Ref D10781 --- source/blender/blenkernel/BKE_action.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_action.h') diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index 717cfa607ad..62315643647 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -227,6 +227,9 @@ void BKE_pose_blend_read_data(struct BlendDataReader *reader, struct bPose *pose void BKE_pose_blend_read_lib(struct BlendLibReader *reader, struct Object *ob, struct bPose *pose); void BKE_pose_blend_read_expand(struct BlendExpander *expander, struct bPose *pose); +/* action_mirror.c */ +void BKE_action_flip_with_pose(struct bAction *act, struct Object *ob_arm); + #ifdef __cplusplus }; #endif -- cgit v1.2.3