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:
authorMitchell Stokes <mogurijin@gmail.com>2011-06-23 23:09:09 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-06-23 23:09:09 +0400
commit2d2aa95227e3b00f9dc42293d4231af3dc5a99b9 (patch)
treecfc159562c6e0f48957d702104dd18f7d2cc05af /source/gameengine/Converter/BL_ShapeDeformer.h
parent413bc87e4f18bb46eeb2f2f52b5278d182b51de8 (diff)
BGE Animations: Making shape actions work again:
* BL_DeformableGameObject is no longer responsible for handling keys, BL_ShapeDeformer is * BL_ShapeDeformer also creates a copy of the key on construction and puts it back on the mesh when destructed. This avoids us permanently modifying Blender data. * I'm not too fond of clearing out the key every frame, but this works and I can't think of another alternative at the moment (something may be possible with some key juggling)
Diffstat (limited to 'source/gameengine/Converter/BL_ShapeDeformer.h')
-rw-r--r--source/gameengine/Converter/BL_ShapeDeformer.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/gameengine/Converter/BL_ShapeDeformer.h b/source/gameengine/Converter/BL_ShapeDeformer.h
index 8115af59d27..7d33204fd4c 100644
--- a/source/gameengine/Converter/BL_ShapeDeformer.h
+++ b/source/gameengine/Converter/BL_ShapeDeformer.h
@@ -49,12 +49,7 @@ class BL_ShapeDeformer : public BL_SkinDeformer
public:
BL_ShapeDeformer(BL_DeformableGameObject *gameobj,
Object *bmeshobj,
- RAS_MeshObject *mesh)
- :
- BL_SkinDeformer(gameobj,bmeshobj, mesh),
- m_lastShapeUpdate(-1)
- {
- };
+ RAS_MeshObject *mesh);
/* this second constructor is needed for making a mesh deformable on the fly. */
BL_ShapeDeformer(BL_DeformableGameObject *gameobj,
@@ -63,12 +58,7 @@ public:
class RAS_MeshObject *mesh,
bool release_object,
bool recalc_normal,
- BL_ArmatureObject* arma = NULL)
- :
- BL_SkinDeformer(gameobj, bmeshobj_old, bmeshobj_new, mesh, release_object, recalc_normal, arma),
- m_lastShapeUpdate(-1)
- {
- };
+ BL_ArmatureObject* arma = NULL);
virtual RAS_Deformer *GetReplica();
virtual void ProcessReplica();
@@ -78,6 +68,9 @@ public:
bool LoadShapeDrivers(Object* arma);
bool ExecuteShapeDrivers(void);
+ struct Key *GetKey();
+ void SetKey(struct Key *key);
+
void ForceUpdate()
{
m_lastShapeUpdate = -1.0;
@@ -86,6 +79,7 @@ public:
protected:
vector<IpoCurve*> m_shapeDrivers;
double m_lastShapeUpdate;
+ struct Key* m_key;
#ifdef WITH_CXX_GUARDEDALLOC