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/Rasterizer
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/Rasterizer')
-rw-r--r--source/gameengine/Rasterizer/RAS_Deformer.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_MeshObject.cpp5
-rw-r--r--source/gameengine/Rasterizer/RAS_MeshObject.h5
3 files changed, 8 insertions, 4 deletions
diff --git a/source/gameengine/Rasterizer/RAS_Deformer.h b/source/gameengine/Rasterizer/RAS_Deformer.h
index bea68e203a9..4e8484ab880 100644
--- a/source/gameengine/Rasterizer/RAS_Deformer.h
+++ b/source/gameengine/Rasterizer/RAS_Deformer.h
@@ -43,7 +43,7 @@ public:
virtual ~RAS_Deformer(){};
virtual void Relink(GEN_Map<class GEN_HashedPtr, void*>*map)=0;
virtual bool Apply(class RAS_IPolyMaterial *polymat)=0;
- virtual void Update(void)=0;
+ virtual bool Update(void)=0;
virtual RAS_Deformer *GetReplica()=0;
protected:
class RAS_MeshObject *m_pMesh;
diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp
index db74110ceea..d7ab88a6b06 100644
--- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp
+++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp
@@ -63,12 +63,13 @@ KX_ArrayOptimizer::~KX_ArrayOptimizer()
-RAS_MeshObject::RAS_MeshObject(int lightlayer)
+RAS_MeshObject::RAS_MeshObject(Mesh* mesh, int lightlayer)
: m_bModified(true),
m_lightlayer(lightlayer),
m_zsort(false),
m_MeshMod(true),
- m_class(0)
+ m_class(0),
+ m_mesh(mesh)
{
}
diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.h b/source/gameengine/Rasterizer/RAS_MeshObject.h
index d8e7a3391aa..d9aa133efb2 100644
--- a/source/gameengine/Rasterizer/RAS_MeshObject.h
+++ b/source/gameengine/Rasterizer/RAS_MeshObject.h
@@ -43,6 +43,7 @@
#include "GEN_HashedPtr.h"
+struct Mesh;
/**
* This class holds an array of vertices and indicies.
*/
@@ -144,9 +145,10 @@ protected:
GEN_Map<class RAS_IPolyMaterial,KX_ArrayOptimizer*> m_matVertexArrayS;
RAS_MaterialBucket::Set m_materials;
+ Mesh* m_mesh;
public:
// for now, meshes need to be in a certain layer (to avoid sorting on lights in realtime)
- RAS_MeshObject(int lightlayer);
+ RAS_MeshObject(Mesh* mesh, int lightlayer);
virtual ~RAS_MeshObject();
vector<RAS_IPolyMaterial*> m_sortedMaterials;
@@ -258,6 +260,7 @@ public:
bool MeshModified();
void SetMeshModified(bool v){m_MeshMod = v;}
+ Mesh* GetMesh() { return m_mesh; }
};