diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-05-07 18:53:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-05-07 18:53:40 +0400 |
commit | f590ffdadc0dceac9d37d30dc565ca083c3c7fca (patch) | |
tree | 44112f23b693d9b8472da7055b0953650732656a /source/gameengine/Ketsji/KX_MeshProxy.cpp | |
parent | 42557f90bd16771a5c6437dbfb3952527df7fb1a (diff) |
[#18645] Texture painting smudge brush darkens images - 2.49RC1
not fixed but the problem is now less bad when projection painting, bilinear interpolation was rounding down.
- added gameOb.attrDict to get the internal gameObject dict.
- mesh.getVertex wasnt setting an exception.
Diffstat (limited to 'source/gameengine/Ketsji/KX_MeshProxy.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_MeshProxy.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index eede3a0e832..c0b05859539 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -221,24 +221,21 @@ PyObject* KX_MeshProxy::PyGetVertexArrayLength(PyObject* args, PyObject* kwds) PyObject* KX_MeshProxy::PyGetVertex(PyObject* args, PyObject* kwds) { - int vertexindex= 1; - int matindex= 1; + int vertexindex; + int matindex; PyObject* vertexob = NULL; - if (PyArg_ParseTuple(args,"ii:getVertex",&matindex,&vertexindex)) - { - RAS_TexVert* vertex = m_meshobj->GetVertex(matindex,vertexindex); - if (vertex) - { - vertexob = (new KX_VertexProxy(this, vertex))->NewProxy(true); - } - } - else { + if (!PyArg_ParseTuple(args,"ii:getVertex",&matindex,&vertexindex)) + return NULL; + + RAS_TexVert* vertex = m_meshobj->GetVertex(matindex,vertexindex); + + if(vertex==NULL) { + PyErr_SetString(PyExc_ValueError, "mesh.getVertex(mat_idx, vert_idx): KX_MeshProxy, could not get a vertex at the given indicies"); return NULL; } - - return vertexob; - + + return (new KX_VertexProxy(this, vertex))->NewProxy(true); } PyObject* KX_MeshProxy::PyGetPolygon(PyObject* args, PyObject* kwds) |