diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-18 19:06:23 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-18 19:06:23 +0400 |
commit | 29a1a05aa595ccd7f8c1943543e8431f85a27773 (patch) | |
tree | 8734fa5be69b4aa92e56170f4a5b80ed47454279 /source/blender/ikplugin/intern | |
parent | f53e6166fb4eb4885e7cabbe6c54cae7418f020e (diff) |
Fix #31430: itasc solver assertion failure with debug builds.
Diffstat (limited to 'source/blender/ikplugin/intern')
-rw-r--r-- | source/blender/ikplugin/intern/itasc_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index d94529b6104..3be096b8935 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -996,7 +996,7 @@ static void convert_pose(IK_Scene *ikscene) // assume uniform scaling and take Y scale as general scale for the armature scale = len_v3(ikscene->blArmature->obmat[1]); - rot = &ikscene->jointArray(0); + rot = (ikscene->jointArray.rows() > 0) ? &ikscene->jointArray(0) : NULL; for (joint=a=0, ikchan = ikscene->channels; a<ikscene->numchan && joint<ikscene->numjoint; ++a, ++ikchan) { pchan= ikchan->pchan; bone= pchan->bone; @@ -1037,7 +1037,7 @@ static void BKE_pose_rest(IK_Scene *ikscene) // rest pose is 0 SetToZero(ikscene->jointArray); // except for transY joints - rot = &ikscene->jointArray(0); + rot = (ikscene->jointArray.rows() > 0) ? &ikscene->jointArray(0) : NULL; for (joint=a=0, ikchan = ikscene->channels; a<ikscene->numchan && joint<ikscene->numjoint; ++a, ++ikchan) { pchan= ikchan->pchan; bone= pchan->bone; @@ -1135,7 +1135,7 @@ static IK_Scene* convert_tree(Scene *blscene, Object *ob, bPoseChannel *pchan) // in Blender, the rest pose is always 0 for joints BKE_pose_rest(ikscene); } - rot = &ikscene->jointArray(0); + rot = (ikscene->jointArray.rows() > 0) ? &ikscene->jointArray(0) : NULL; for (a=0, ikchan = ikscene->channels; a<tree->totchannel; ++a, ++ikchan) { pchan= ikchan->pchan; bone= pchan->bone; |