diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-02-05 16:19:14 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-02-05 16:19:14 +0300 |
commit | 90cf78eb5409a77c912b90fb812a4391e31897ae (patch) | |
tree | 23594e3f54008f749cfeacc394134425316d860c /source/blender/makesdna/DNA_armature_types.h | |
parent | fe99f35210bfe932e8f1e8161dc9fe68cd09bf5d (diff) |
Fix bones moving when changing between editmode and posemode.
Patch #25901 by Tobias Oelgarte.
Bone transformations would be converted back and forth between different
representations when changing modes, which due to numerical errors could
lead to bone transformations slowly changing as you edit the armature.
Now the editmode head, tail and roll values are stored in bones and used
directly when entering edit mode. Head and tail were already there but
now we ensure they are the exact same value, roll was not yet there, so
we have a version patch for it.
The sub version was incremented to 1 for the version patch.
Diffstat (limited to 'source/blender/makesdna/DNA_armature_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_armature_types.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 108c0883f15..89c2d69b8be 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -57,8 +57,9 @@ typedef struct Bone { int flag; float arm_head[3]; - float arm_tail[3]; /* head/tail and roll in Armature Space (rest pos) */ + float arm_tail[3]; /* head/tail in Armature Space (rest pos) */ float arm_mat[4][4]; /* matrix: (bonemat(b)+head(b))*arm_mat(b-1), rest pos*/ + float arm_roll; /* roll in Armature Space (rest pos) */ float dist, weight; /* dist, weight: for non-deformgroup deforms */ float xwidth, length, zwidth; /* width: for block bones. keep in this order, transform! */ @@ -68,7 +69,7 @@ typedef struct Bone { float size[3]; /* patch for upward compat, UNUSED! */ int layer; /* layers that bone appears on */ short segments; /* for B-bones */ - short pad[3]; + short pad[1]; } Bone; typedef struct bArmature { |