diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-10 14:26:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-10 14:26:39 +0400 |
commit | 250109f5ace8471451a6d8bda8f67ffc955eb4b7 (patch) | |
tree | 6228de4b3b9dd229e2b129549e69e6edf06c84be /source/gameengine/Ketsji/KX_VertexProxy.cpp | |
parent | fecc3b9d68102630fc53f451a3f405f180b31384 (diff) |
add argument so recent bge function mesh.transform_uv() so you can optionally transform between UV1 / UV2
Diffstat (limited to 'source/gameengine/Ketsji/KX_VertexProxy.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_VertexProxy.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp index 02333f8ae2f..82e414d7c42 100644 --- a/source/gameengine/Ketsji/KX_VertexProxy.cpp +++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp @@ -63,8 +63,8 @@ PyTypeObject KX_VertexProxy::Type = { PyMethodDef KX_VertexProxy::Methods[] = { {"getXYZ", (PyCFunction)KX_VertexProxy::sPyGetXYZ,METH_NOARGS}, {"setXYZ", (PyCFunction)KX_VertexProxy::sPySetXYZ,METH_O}, - {"getUV", (PyCFunction)KX_VertexProxy::sPyGetUV,METH_NOARGS}, - {"setUV", (PyCFunction)KX_VertexProxy::sPySetUV,METH_O}, + {"getUV", (PyCFunction)KX_VertexProxy::sPyGetUV1, METH_NOARGS}, + {"setUV", (PyCFunction)KX_VertexProxy::sPySetUV1, METH_O}, {"getUV2", (PyCFunction)KX_VertexProxy::sPyGetUV2,METH_NOARGS}, {"setUV2", (PyCFunction)KX_VertexProxy::sPySetUV2,METH_VARARGS}, @@ -247,7 +247,7 @@ int KX_VertexProxy::pyattr_set_u(void *self_v, const struct KX_PYATTRIBUTE_DEF * float val = PyFloat_AsDouble(value); MT_Point2 uv = self->m_vertex->getUV1(); uv[0] = val; - self->m_vertex->SetUV(uv); + self->m_vertex->SetUV1(uv); self->m_mesh->SetMeshModified(true); return PY_SET_ATTR_SUCCESS; } @@ -262,7 +262,7 @@ int KX_VertexProxy::pyattr_set_v(void *self_v, const struct KX_PYATTRIBUTE_DEF * float val = PyFloat_AsDouble(value); MT_Point2 uv = self->m_vertex->getUV1(); uv[1] = val; - self->m_vertex->SetUV(uv); + self->m_vertex->SetUV1(uv); self->m_mesh->SetMeshModified(true); return PY_SET_ATTR_SUCCESS; } @@ -389,9 +389,8 @@ int KX_VertexProxy::pyattr_set_UV(void *self_v, const struct KX_PYATTRIBUTE_DEF if (PySequence_Check(value)) { MT_Point2 vec; - if (PyVecTo(value, vec)) - { - self->m_vertex->SetUV(vec); + if (PyVecTo(value, vec)) { + self->m_vertex->SetUV1(vec); self->m_mesh->SetMeshModified(true); return PY_SET_ATTR_SUCCESS; } @@ -521,18 +520,18 @@ PyObject *KX_VertexProxy::PySetRGBA(PyObject *value) } -PyObject *KX_VertexProxy::PyGetUV() +PyObject *KX_VertexProxy::PyGetUV1() { return PyObjectFrom(MT_Vector2(m_vertex->getUV1())); } -PyObject *KX_VertexProxy::PySetUV(PyObject *value) +PyObject *KX_VertexProxy::PySetUV1(PyObject *value) { MT_Point2 vec; if (!PyVecTo(value, vec)) return NULL; - m_vertex->SetUV(vec); + m_vertex->SetUV1(vec); m_mesh->SetMeshModified(true); Py_RETURN_NONE; } |