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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-22 13:31:07 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-22 13:31:07 +0400
commit06d57fdae05bad63438d360204c890d7ab81387a (patch)
treeda871502636807a0911c394b7fa82f51aa704e6c /source/gameengine/Converter/BL_SkinDeformer.cpp
parentddf965b63acd86912d9d1d12633ccd1822198d48 (diff)
Shape Keys
Internal change to not apply the shape keys to the Mesh vertex coordinates, but rather use it as part of the derivedmesh/displist evaluation. This only has one practical advantage right now, which is that you can now make a linked duplicate and pin it's shape key to a different shape than the first object. Further, this makes shape keys correctly fit into the modifier stack design, which will help implement some other features later. Also it means the mesh vertex coordinates are now really the orco's.
Diffstat (limited to 'source/gameengine/Converter/BL_SkinDeformer.cpp')
-rw-r--r--source/gameengine/Converter/BL_SkinDeformer.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp
index a13f78e1b27..f166a7252ad 100644
--- a/source/gameengine/Converter/BL_SkinDeformer.cpp
+++ b/source/gameengine/Converter/BL_SkinDeformer.cpp
@@ -172,7 +172,7 @@ void BL_SkinDeformer::ProcessReplica()
//void where_is_pose (Object *ob);
//void armature_deform_verts(Object *armOb, Object *target, float (*vertexCos)[3], int numVerts, int deformflag);
-bool BL_SkinDeformer::Update(void)
+bool BL_SkinDeformer::UpdateInternal(bool shape_applied)
{
/* See if the armature has been updated for this frame */
if (PoseUpdated()){
@@ -182,12 +182,14 @@ bool BL_SkinDeformer::Update(void)
/* but it requires the blender object pointer... */
Object* par_arma = m_armobj->GetArmatureObject();
- /* store verts locally */
- VerifyStorage();
-
- /* duplicate */
- for (int v =0; v<m_bmesh->totvert; v++)
- VECCOPY(m_transverts[v], m_bmesh->mvert[v].co);
+ if(!shape_applied) {
+ /* store verts locally */
+ VerifyStorage();
+
+ /* duplicate */
+ for (int v =0; v<m_bmesh->totvert; v++)
+ VECCOPY(m_transverts[v], m_bmesh->mvert[v].co);
+ }
m_armobj->ApplyPose();
@@ -219,6 +221,11 @@ bool BL_SkinDeformer::Update(void)
return false;
}
+bool BL_SkinDeformer::Update(void)
+{
+ return UpdateInternal(false);
+}
+
/* XXX note: I propose to drop this function */
void BL_SkinDeformer::SetArmature(BL_ArmatureObject *armobj)
{