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:
authorChris Want <cwant@ualberta.ca>2004-01-03 06:53:18 +0300
committerChris Want <cwant@ualberta.ca>2004-01-03 06:53:18 +0300
commitd311e9617468beb507202e4c92017703bc11feb3 (patch)
treed4ab64d160b682e31e55cdd4d827faa0effa9576 /source/blender/blenkernel
parentde21846e690dd5a4606a42b776d55f119e5620d7 (diff)
Armature speed ups, Part III
---------------------------- Another (major) armature speed up for bones with many constraints. When tranform()-ing, figure out which bones need to be recalculated beforehand and only update those bones.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/armature.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index e5f57e2e213..b16d2143edf 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -297,11 +297,6 @@ void where_is_bone1_time (Object *ob, Bone *bone, float ctime)
where_is_bone_time (ob, bone->parent, ctime);
}
- /* Build the parent matrix : Depreciated */
-// if (bone->parent)
-// Mat4MulMat4(bone->parmat, bone->parent->obmat, bone->parent->parmat);
-// else
-// Mat4One (bone->parmat);
#endif
if (arm){
@@ -312,6 +307,13 @@ void where_is_bone1_time (Object *ob, Bone *bone, float ctime)
}
}
+ /* If the bone has been flagged as 'no calc', let's not
+ * bother calculating it.
+ */
+ if (bone->flag & BONE_NOCALC) {
+ return;
+ }
+
if (bone->flag & BONE_IK_TOPARENT){
bone->loc[0]=bone->loc[1]=bone->loc[2]=0.0F;
}
@@ -839,8 +841,10 @@ static void apply_pose_bonechildren (Bone* bone, bPose* pose, int doit)
// Ensure there is a channel for this bone
chan = verify_pose_channel (pose, bone->name);
- if (chan) {
- // Search the pose for a channel with the same name
+ /* Only do this crazy stuff if the no calc flag
+ * is cleared for this bone.
+ */
+ if (chan && (~bone->flag & BONE_NOCALC)) {
if (chan->flag & POSE_LOC)
memcpy (bone->loc, chan->loc, sizeof (bone->loc));
if (chan->flag & POSE_SIZE)