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-04-20 19:06:46 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-20 19:06:46 +0400
commit874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch)
tree5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/gameengine/Ketsji/KX_MeshProxy.h
parent7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff)
parentc5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff)
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes: * blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/gameengine/Ketsji/KX_MeshProxy.h')
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.h b/source/gameengine/Ketsji/KX_MeshProxy.h
index 34f60a54a3a..aeecefc09e6 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.h
+++ b/source/gameengine/Ketsji/KX_MeshProxy.h
@@ -31,6 +31,9 @@
#include "SCA_IObject.h"
+/* utility conversion function */
+bool ConvertPythonToMesh(PyObject * value, class RAS_MeshObject **object, bool py_none_ok, const char *error_prefix);
+
class KX_MeshProxy : public SCA_IObject
{
Py_Header;
@@ -46,24 +49,31 @@ public:
virtual CValue* Calc(VALUE_OPERATOR op, CValue *val) ;
virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
virtual const STR_String & GetText();
- virtual float GetNumber();
+ virtual double GetNumber();
+ virtual RAS_MeshObject* GetMesh() { return m_meshobj; }
virtual STR_String GetName();
virtual void SetName(STR_String name); // Set the name of the value
virtual void ReplicaSetName(STR_String name);
virtual CValue* GetReplica();
// stuff for python integration
- virtual PyObject* _getattr(const char *attr);
- KX_PYMETHOD(KX_MeshProxy,GetNumMaterials);
+ virtual PyObject* py_getattro(PyObject *attr);
+ virtual int py_setattro(PyObject *attr, PyObject* value);
+
+ KX_PYMETHOD(KX_MeshProxy,GetNumMaterials); // Deprecated
KX_PYMETHOD(KX_MeshProxy,GetMaterialName);
KX_PYMETHOD(KX_MeshProxy,GetTextureName);
- KX_PYMETHOD_NOARGS(KX_MeshProxy,GetNumPolygons);
+ KX_PYMETHOD_NOARGS(KX_MeshProxy,GetNumPolygons); // Deprecated
// both take materialid (int)
KX_PYMETHOD(KX_MeshProxy,GetVertexArrayLength);
KX_PYMETHOD(KX_MeshProxy,GetVertex);
KX_PYMETHOD(KX_MeshProxy,GetPolygon);
KX_PYMETHOD_DOC(KX_MeshProxy, reinstancePhysicsMesh);
+
+ static PyObject* pyattr_get_materials(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
+ static PyObject * pyattr_get_numMaterials(void * self, const KX_PYATTRIBUTE_DEF * attrdef);
+ static PyObject * pyattr_get_numPolygons(void * self, const KX_PYATTRIBUTE_DEF * attrdef);
};
#endif //__KX_MESHPROXY