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:
Diffstat (limited to 'source/gameengine/Converter/BL_DeformableGameObject.cpp')
-rw-r--r--source/gameengine/Converter/BL_DeformableGameObject.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp
index bfba054d0d4..48392ee8dda 100644
--- a/source/gameengine/Converter/BL_DeformableGameObject.cpp
+++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp
@@ -87,15 +87,16 @@ bool BL_DeformableGameObject::SetActiveAction(BL_ShapeActionActuator *act, short
bool BL_DeformableGameObject::GetShape(vector<float> &shape)
{
shape.clear();
- if (m_pDeformer)
+ BL_ShapeDeformer* shape_deformer = dynamic_cast<BL_ShapeDeformer*>(m_pDeformer);
+ if (shape_deformer)
{
- Mesh* mesh = ((BL_MeshDeformer*)m_pDeformer)->GetMesh();
// this check is normally superfluous: a shape deformer can only be created if the mesh
// has relative keys
- if (mesh && mesh->key && mesh->key->type==KEY_RELATIVE)
+ Key* key = shape_deformer->GetKey();
+ if (key && key->type==KEY_RELATIVE)
{
KeyBlock *kb;
- for (kb = (KeyBlock*)mesh->key->block.first; kb; kb = (KeyBlock*)kb->next)
+ for (kb = (KeyBlock*)key->block.first; kb; kb = (KeyBlock*)kb->next)
{
shape.push_back(kb->curval);
}