Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-08-19 14:14:22 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-08-19 14:14:22 +0400
commit36ffc7accde82eb1d1930ed8758e315339fac8bc (patch)
treef57a6786aa363babf64db3dcaa0320469224cc67 /source/blender/blenkernel/BKE_armature.h
parentc46cbc602e1007a15c6d9824ec34c41f124faeaa (diff)
Made armatures evaluation safe for threading
Apparently, some routines in armature deformation code were using static arrays. This is probably just an optimization thing, but it's very bad for threading. Now made it so bbone matrices array is allocating in callee function stack. This required exposing MAX_BBONE_SUBDIV to an external API, This is not so much crappy from code side, and it shall be the same fast as before. -- svn merge -r58278:58279 ^/branches/soc-2013-depsgraph_mt
Diffstat (limited to 'source/blender/blenkernel/BKE_armature.h')
-rw-r--r--source/blender/blenkernel/BKE_armature.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 9bdc5b0fc8f..60e03af5077 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -124,11 +124,13 @@ void BKE_pchan_to_pose_mat(struct bPoseChannel *pchan, float rotscale_mat[4][4],
void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode);
/* B-Bone support */
+#define MAX_BBONE_SUBDIV 32
+
typedef struct Mat4 {
float mat[4][4];
} Mat4;
-Mat4 *b_bone_spline_setup(struct bPoseChannel *pchan, int rest);
+void b_bone_spline_setup(struct bPoseChannel *pchan, int rest, Mat4 result_array[MAX_BBONE_SUBDIV]);
/* like EBONE_VISIBLE */
#define PBONE_VISIBLE(arm, bone) ( \