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-04-05 17:33:08 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-04-05 17:33:08 +0400
commitcc33fcfe7b76aa8370cace83859d085b42304d48 (patch)
treebd01c8aeb131267892ddaf5df8b14755c3dde831 /source/gameengine/Converter/BL_SkinDeformer.h
parent0eb018919a193a4d868f90e21601eba383a82e60 (diff)
Commit patch #2439: Mesh replacement in BGE will react properly to armature deform
Changing the mesh of an object that has a deform controller (armature) is now properly handled. The new mesh must have vertex groups matching the armature bones. In simple terms, the new mesh must deform correctly when you assign it to the object in Blender and you test the action. It will deform the same when you replace the object mesh during the game.
Diffstat (limited to 'source/gameengine/Converter/BL_SkinDeformer.h')
-rw-r--r--source/gameengine/Converter/BL_SkinDeformer.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/source/gameengine/Converter/BL_SkinDeformer.h b/source/gameengine/Converter/BL_SkinDeformer.h
index 74adc6c2943..b4e55018604 100644
--- a/source/gameengine/Converter/BL_SkinDeformer.h
+++ b/source/gameengine/Converter/BL_SkinDeformer.h
@@ -72,7 +72,8 @@ public:
m_armobj(arma),
m_lastUpdate(-1),
m_defbase(&bmeshobj->defbase),
- m_releaseobject(false)
+ m_releaseobject(false),
+ m_restoremat(false)
{
};
@@ -81,15 +82,7 @@ public:
struct Object *bmeshobj_new,
class BL_SkinMeshObject *mesh,
bool release_object,
- BL_ArmatureObject* arma = NULL)
- : //
- BL_MeshDeformer(bmeshobj_old, mesh),
- m_armobj(arma),
- m_lastUpdate(-1),
- m_defbase(&bmeshobj_old->defbase),
- m_releaseobject(release_object)
- {
- };
+ BL_ArmatureObject* arma = NULL);
virtual void ProcessReplica();
virtual RAS_Deformer *GetReplica();
@@ -102,6 +95,8 @@ protected:
float m_time;
double m_lastUpdate;
ListBase* m_defbase;
+ float m_obmat[4][4]; // the original object matrice in case of dynamic mesh replacement
+ bool m_restoremat;
bool m_releaseobject;
};