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:
authorCampbell Barton <ideasman42@gmail.com>2010-10-25 21:08:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-25 21:08:40 +0400
commite002bcd876082562e197d4c33e8fa10c58447f88 (patch)
treedbf0092824c40269f8211d70fb4c19275f55b7c3
parent0dde63c0440c8d34004be8a79a8c58b66b84f921 (diff)
bugfix [#22277] Absolute Shapekeys crash (in BGE)
running a shape actuator on a softbody would crash because it assumed the deformer was a BL_MeshDeformer. Added TODO note, since it would be nice if softbody would work with shape keys too.
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h2
-rw-r--r--source/gameengine/Converter/BL_DeformableGameObject.h16
-rw-r--r--source/gameengine/Physics/Bullet/CMakeLists.txt3
3 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 0cba387169a..0d8b97a66ed 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -66,7 +66,6 @@ void VIEW3D_OT_layers(struct wmOperatorType *ot);
/* view3d_ops.c */
void view3d_operatortypes(void);
-void view3d_keymap(struct wmKeyConfig *keyconf);
/* view3d_edit.c */
void VIEW3D_OT_zoom(struct wmOperatorType *ot);
@@ -94,6 +93,7 @@ void view3d_boxview_copy(ScrArea *sa, ARegion *ar);
void view3d_persp_mat4(struct RegionView3D *rv3d, float mat[][4]);
/* view3d_fly.c */
+void view3d_keymap(struct wmKeyConfig *keyconf);
void VIEW3D_OT_fly(struct wmOperatorType *ot);
/* drawanim.c */
diff --git a/source/gameengine/Converter/BL_DeformableGameObject.h b/source/gameengine/Converter/BL_DeformableGameObject.h
index 076bfaeb458..12f641eee96 100644
--- a/source/gameengine/Converter/BL_DeformableGameObject.h
+++ b/source/gameengine/Converter/BL_DeformableGameObject.h
@@ -37,6 +37,7 @@
#include "DNA_mesh_types.h"
#include "KX_GameObject.h"
#include "BL_MeshDeformer.h"
+#include "KX_SoftBodyDeformer.h"
#include <vector>
class BL_ShapeActionActuator;
@@ -79,7 +80,20 @@ public:
bool GetShape(vector<float> &shape);
Key* GetKey()
{
- return (m_pDeformer) ? ((BL_MeshDeformer*)m_pDeformer)->GetMesh()->key : NULL;
+ if(m_pDeformer) {
+ BL_MeshDeformer *deformer= dynamic_cast<BL_MeshDeformer *>(m_pDeformer); // incase its not a MeshDeformer
+ if(deformer) {
+ return deformer->GetMesh()->key;
+ }
+
+#if 0 // TODO. shape keys for softbody, currently they dont store a mesh.
+ KX_SoftBodyDeformer *deformer_soft= dynamic_cast<KX_SoftBodyDeformer *>(m_pDeformer);
+ if(deformer) {
+ return deformer->GetMesh()->key;
+ }
+#endif
+ }
+ return NULL;
}
virtual void SetDeformer(class RAS_Deformer* deformer);
diff --git a/source/gameengine/Physics/Bullet/CMakeLists.txt b/source/gameengine/Physics/Bullet/CMakeLists.txt
index faa9385a745..1954d58df3e 100644
--- a/source/gameengine/Physics/Bullet/CMakeLists.txt
+++ b/source/gameengine/Physics/Bullet/CMakeLists.txt
@@ -24,6 +24,9 @@
#
# ***** END GPL LICENSE BLOCK *****
+# since this includes bullet we get errors from the headers too
+REMOVE_STRICT_FLAGS()
+
SET(INC
.
../common