[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15213] trunk/blender/source: Some pose action ipo corruptions when using BGE, added some debug printf' s when copying to/from the same pose since it should never happen.
Campbell Barton
ideasman42 at gmail.com
Fri Jun 13 04:21:34 CEST 2008
Revision: 15213
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15213
Author: campbellbarton
Date: 2008-06-13 04:20:09 +0200 (Fri, 13 Jun 2008)
Log Message:
-----------
Some pose action ipo corruptions when using BGE, added some debug printf's when copying to/from the same pose since it should never happen.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/action.c
trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp
Modified: trunk/blender/source/blender/blenkernel/intern/action.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/action.c 2008-06-12 21:17:02 UTC (rev 15212)
+++ trunk/blender/source/blender/blenkernel/intern/action.c 2008-06-13 02:20:09 UTC (rev 15213)
@@ -290,6 +290,12 @@
return;
}
+ if (*dst==src) {
+ printf("copy_pose source and target are the same\n");
+ *dst=NULL;
+ return;
+ }
+
outPose= MEM_callocN(sizeof(bPose), "pose");
duplicatelist(&outPose->chanbase, &src->chanbase);
@@ -740,6 +746,11 @@
const bPoseChannel *schan;
bPoseChannel *pchan= pose->chanbase.first;
+ if (pose==src) {
+ printf("extract_pose_from_pose source and target are the same\n");
+ return;
+ }
+
for (schan=src->chanbase.first; schan; schan=schan->next, pchan= pchan->next) {
copy_pose_channel_data(pchan, schan);
}
@@ -817,6 +828,12 @@
return;
}
+ if (to==from) {
+ printf("copy_pose_result source and target are the same\n");
+ return;
+ }
+
+
for(pchanfrom= from->chanbase.first; pchanfrom; pchanfrom= pchanfrom->next) {
pchanto= get_pose_channel(to, pchanfrom->name);
if(pchanto) {
Modified: trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp 2008-06-12 21:17:02 UTC (rev 15212)
+++ trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp 2008-06-13 02:20:09 UTC (rev 15213)
@@ -92,9 +92,10 @@
/* there is only 1 unique Pose per Armature */
void BL_ArmatureObject::ApplyPose()
{
- if (m_pose){
+ if (m_pose) {
// copy to armature object
- extract_pose_from_pose(m_objArma->pose, m_pose);
+ if (m_objArma->pose != m_pose)/* This should never happen but it does - Campbell */
+ extract_pose_from_pose(m_objArma->pose, m_pose);
// is this needed anymore?
//if (!m_mrdPose)
More information about the Bf-blender-cvs
mailing list