diff options
author | Diego Borghetti <bdiego@gmail.com> | 2008-06-04 04:35:10 +0400 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2008-06-04 04:35:10 +0400 |
commit | 2c19984f79e4a9ca5416f226f86ca260c59c838f (patch) | |
tree | f0adc6f923980e7d516e8a10ceb96e4347f8b1fa /source/gameengine | |
parent | 81172e3d35cabb4b4c055d9369893dee555d665d (diff) |
branches/blender-2.47
Merge from trunk:
Revision: 15096
Revision: 15110
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureObject.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index ff9c6a75aa9..08567dde840 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -153,9 +153,12 @@ void BL_ArmatureObject::GetPose(bPose **pose) int copy_constraint_channels_hack = 1; copy_pose(pose, m_pose, copy_constraint_channels_hack); } - else + else { + if (*pose == m_pose) + // no need to copy if the pointers are the same + return; extract_pose_from_pose(*pose, m_pose); - + } } void BL_ArmatureObject::GetMRDPose(bPose **pose) @@ -169,7 +172,11 @@ void BL_ArmatureObject::GetMRDPose(bPose **pose) //} if (!*pose) - copy_pose(pose, m_objArma->pose, 0); + // must duplicate the constraints too otherwise we have corruption in free_pose_channels() + // because it will free the blender constraints. + // Ideally, blender should rememeber that the constraints were not copied so that + // free_pose_channels() would not free them. + copy_pose(pose, m_objArma->pose, 1); else extract_pose_from_pose(*pose, m_objArma->pose); |