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:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-06-18 10:46:49 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-06-18 10:46:49 +0400
commit2bece8dcb5104bc95149b0c40723f1dc855d6b29 (patch)
tree6bf9f626e03847e48f4b065d2765e4d0099dde64 /source/gameengine/Converter/BL_SkinDeformer.h
parentb4c123c275172eb4f8477ea90c3f68d61565483b (diff)
BGE Patch: Add Shape Action support and update MSCV_7 project file for glew.
Shape Action are now supported in the BGE. A new type of actuator "Shape Action" is available on mesh objects. It can be combined with Action actuator on parent armature. Only relative keys are supported. All the usual action options are available: type, blending, priority, Python API. Only actions with shape channels should be specified of course, otherwise the actuator has no effect. Shape action will still work after a mesh replacement provided that the new mesh has compatible shape keys.
Diffstat (limited to 'source/gameengine/Converter/BL_SkinDeformer.h')
-rw-r--r--source/gameengine/Converter/BL_SkinDeformer.h35
1 files changed, 16 insertions, 19 deletions
diff --git a/source/gameengine/Converter/BL_SkinDeformer.h b/source/gameengine/Converter/BL_SkinDeformer.h
index 79f6453a25d..603e716fb1e 100644
--- a/source/gameengine/Converter/BL_SkinDeformer.h
+++ b/source/gameengine/Converter/BL_SkinDeformer.h
@@ -52,27 +52,20 @@ public:
// void SetArmatureController (BL_ArmatureController *cont);
virtual void Relink(GEN_Map<class GEN_HashedPtr, void*>*map)
{
- void **h_obj = (*map)[m_armobj];
- if (h_obj){
- SetArmature( (BL_ArmatureObject*)(*h_obj) );
+ if (m_armobj){
+ void **h_obj = (*map)[m_armobj];
+ if (h_obj){
+ SetArmature( (BL_ArmatureObject*)(*h_obj) );
+ }
+ else
+ m_armobj=NULL;
}
- else
- m_armobj=NULL;
}
void SetArmature (class BL_ArmatureObject *armobj);
BL_SkinDeformer(struct Object *bmeshobj,
class BL_SkinMeshObject *mesh,
- BL_ArmatureObject* arma = NULL)
- : //
- BL_MeshDeformer(bmeshobj, mesh),
- m_armobj(arma),
- m_lastUpdate(-1),
- m_defbase(&bmeshobj->defbase),
- m_restoremat(false),
- m_releaseobject(false)
- {
- };
+ BL_ArmatureObject* arma = NULL);
/* this second constructor is needed for making a mesh deformable on the fly. */
BL_SkinDeformer(struct Object *bmeshobj_old,
@@ -84,16 +77,20 @@ public:
virtual void ProcessReplica();
virtual RAS_Deformer *GetReplica();
virtual ~BL_SkinDeformer();
- void Update (void);
+ bool Update (void);
bool Apply (class RAS_IPolyMaterial *polymat);
+ void ForceUpdate()
+ {
+ m_lastArmaUpdate = -1.0;
+ };
+
protected:
BL_ArmatureObject* m_armobj; // Our parent object
float m_time;
- double m_lastUpdate;
+ double m_lastArmaUpdate;
ListBase* m_defbase;
- float m_obmat[4][4]; // the original object matrice in case of dynamic mesh replacement
- bool m_restoremat;
+ float m_obmat[4][4]; // the reference matrix for skeleton deform
bool m_releaseobject;
};