From a58f0eea4f1e9b04e519e123eb656009cf718f9e Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sat, 24 Nov 2018 15:12:24 +0300 Subject: RNA: expose access to B-Bone shape data from Python. B-Bone shape is a non-trivial computation, so access to the results would be useful for Python scripts working with B-Bones, e.g. rig generation. This exposes both final segment matrices, and the tangent vectors computed from the custom handle bones. Since the handle tangents use the axis+roll orientation math of edit bones, add matrix conversion static methods to Bone. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D3983 --- source/blender/blenkernel/BKE_armature.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/BKE_armature.h') diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 1831e93cccb..0e356c1557f 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -165,9 +165,11 @@ typedef struct BBoneSplineParameters { } BBoneSplineParameters; void BKE_pchan_get_bbone_handles(struct bPoseChannel *pchan, struct bPoseChannel **r_prev, struct bPoseChannel **r_next); +void BKE_pchan_get_bbone_spline_parameters(struct bPoseChannel *pchan, const bool rest, struct BBoneSplineParameters *r_param); void b_bone_spline_setup(struct bPoseChannel *pchan, const bool rest, Mat4 result_array[MAX_BBONE_SUBDIV]); +void BKE_compute_b_bone_handles(const BBoneSplineParameters *param, float h1[3], float *r_roll1, float h2[3], float *r_roll2, bool ease, bool offsets); int BKE_compute_b_bone_spline(struct BBoneSplineParameters *param, Mat4 result_array[MAX_BBONE_SUBDIV]); void BKE_pchan_cache_bbone_segments(struct bPoseChannel *pchan); -- cgit v1.2.3