From d116932f3a6cf081cd55aba11b4baf32b998a4d2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 3 May 2017 08:34:24 +0200 Subject: Add BBone and Wire Armature draw types to DrawManager. Most of this was copying/adapting code from octahedral existing draw code, tough part was to get BBone matrices to behave as expected, they are using a fairly specific setup... Addresses T51365 and T51362. --- source/blender/blenkernel/intern/action.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/intern/action.c') diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 6ecbc3e7bde..44ee9aa7bf1 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -579,6 +579,8 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, const bool copy_constraints) if (pchan->prop) { pchan->prop = IDP_CopyProperty(pchan->prop); } + + pchan->bbone_matrices = NULL; /* Drawing cache of bbone matrices, no need to copy. */ } /* for now, duplicate Bone Groups too when doing this */ @@ -767,6 +769,9 @@ void BKE_pose_channel_free_ex(bPoseChannel *pchan, bool do_id_user) IDP_FreeProperty(pchan->prop); MEM_freeN(pchan->prop); } + + /* Cached bbone matrices, for new draw manager rendering code. */ + MEM_SAFE_FREE(pchan->bbone_matrices); } void BKE_pose_channel_free(bPoseChannel *pchan) -- cgit v1.2.3