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:
authorDiego Borghetti <bdiego@gmail.com>2008-06-04 04:35:10 +0400
committerDiego Borghetti <bdiego@gmail.com>2008-06-04 04:35:10 +0400
commit2c19984f79e4a9ca5416f226f86ca260c59c838f (patch)
treef0adc6f923980e7d516e8a10ceb96e4347f8b1fa /source/gameengine
parent81172e3d35cabb4b4c055d9369893dee555d665d (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.cpp13
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);