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:
authorCampbell Barton <ideasman42@gmail.com>2009-04-07 15:06:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-07 15:06:35 +0400
commit5d64dd019e7e8150db40505097d1b4048f4e0153 (patch)
tree65d3ac2f7d7d8a9e3aad5ba5331c43a5d1fca358 /source/gameengine/Ketsji/KX_PolygonMaterial.cpp
parentc054ea02039e9209095108c1b1f42250a7e85d8f (diff)
BGE Python API
Use each types dictionary to store attributes PyAttributeDef's so it uses pythons hash lookup (which it was already doing for methods) rather then doing a string lookup on the array each time. This also means attributes can be found in the type without having to do a dir() on the instance.
Diffstat (limited to 'source/gameengine/Ketsji/KX_PolygonMaterial.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PolygonMaterial.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
index 3975189a9c2..e66d9d60db8 100644
--- a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
@@ -232,21 +232,13 @@ PyParentObject KX_PolygonMaterial::Parents[] = {
};
PyObject* KX_PolygonMaterial::py_getattro(PyObject *attr)
-{
- PyObject* object = py_getattro_self(Attributes, this, attr);
- if (object != NULL)
- return object;
-
+{
py_getattro_up(PyObjectPlus);
}
int KX_PolygonMaterial::py_setattro(PyObject *attr, PyObject *value)
{
- int ret = py_setattro_self(Attributes, this, attr, value);
- if (ret >= 0)
- return ret;
-
- return PyObjectPlus::py_setattro(attr, value);
+ py_setattro_up(PyObjectPlus);
}
KX_PYMETHODDEF_DOC(KX_PolygonMaterial, setCustomMaterial, "setCustomMaterial(material)")