diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-05-12 02:07:30 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-05-12 02:07:30 +0400 |
commit | 24906dc9626c0acb40d8ee77070df7f95b58e0ce (patch) | |
tree | b336d9d7222f64d0decd4458de7d404d6cedf1b2 | |
parent | e847bcf784f2f5b8006d836789fb0c42a0d68e35 (diff) |
BGE #18724: Modifier cause crash in 2.49RC2. My bad, I was too quick to fix the soft body problem in revision 20119. This time I tested against modifiers, soft body, armatures and replace mesh.
3 files changed, 16 insertions, 9 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 7d0bbbe107c..09604e5c2e3 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2121,8 +2121,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, //tf.Add(gameobj->GetSGNode()); gameobj->NodeUpdateGS(0); - //move to after finishing everything so that soft body deformer is included - //gameobj->AddMeshUser(); + gameobj->AddMeshUser(); } else @@ -2312,8 +2311,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, //tf.Add(gameobj->GetSGNode()); gameobj->NodeUpdateGS(0); - //move to after finishing everything so that soft body deformer is included - //gameobj->AddMeshUser(); + gameobj->AddMeshUser(); } else { @@ -2665,7 +2663,6 @@ void BL_ConvertBlenderObjects(struct Main* maggie, { KX_GameObject* gameobj = static_cast<KX_GameObject*>(objectlist->GetValue(i)); gameobj->ResetState(); - gameobj->AddMeshUser(); } #endif //CONVERT_LOGIC diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp index a9d5b643fd4..cb882f31e80 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.cpp +++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp @@ -30,6 +30,8 @@ #include "BL_DeformableGameObject.h" #include "BL_ShapeDeformer.h" #include "BL_ShapeActionActuator.h" +#include "RAS_MaterialBucket.h" + #ifdef HAVE_CONFIG_H #include <config.h> @@ -101,3 +103,14 @@ bool BL_DeformableGameObject::GetShape(vector<float> &shape) return !shape.empty(); } +void BL_DeformableGameObject::SetDeformer(class RAS_Deformer* deformer) +{ + m_pDeformer = deformer; + + SG_QList::iterator<RAS_MeshSlot> mit(m_meshSlots); + for(mit.begin(); !mit.end(); ++mit) + { + (*mit)->SetDeformer(deformer); + } +} + diff --git a/source/gameengine/Converter/BL_DeformableGameObject.h b/source/gameengine/Converter/BL_DeformableGameObject.h index dbc89bd2a20..b20b8e81b37 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.h +++ b/source/gameengine/Converter/BL_DeformableGameObject.h @@ -83,10 +83,7 @@ public: return (m_pDeformer) ? ((BL_MeshDeformer*)m_pDeformer)->GetMesh()->key : NULL; } - virtual void SetDeformer(class RAS_Deformer* deformer) - { - m_pDeformer = deformer; - } + virtual void SetDeformer(class RAS_Deformer* deformer); virtual class RAS_Deformer* GetDeformer() { return m_pDeformer; |