diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index ff59e5b1a10..55faebc509c 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -10,6 +10,8 @@ #include "../BPy_Id.h" #include "../Interface1D/BPy_FEdge.h" +#include "BLI_sys_types.h" + #ifdef __cplusplus extern "C" { #endif @@ -251,7 +253,7 @@ static Mathutils_Callback SVertex_mathutils_cb = { SVertex_mathutils_set_index, }; -static unsigned char SVertex_mathutils_cb_index = -1; +static uchar SVertex_mathutils_cb_index = -1; void SVertex_mathutils_register_callback() { @@ -265,13 +267,13 @@ PyDoc_STRVAR(SVertex_point_3d_doc, "\n" ":type: :class:`mathutils.Vector`"); -static PyObject *SVertex_point_3d_get(BPy_SVertex *self, void *UNUSED(closure)) +static PyObject *SVertex_point_3d_get(BPy_SVertex *self, void * /*closure*/) { return Vector_CreatePyObject_cb( (PyObject *)self, 3, SVertex_mathutils_cb_index, MATHUTILS_SUBTYPE_POINT3D); } -static int SVertex_point_3d_set(BPy_SVertex *self, PyObject *value, void *UNUSED(closure)) +static int SVertex_point_3d_set(BPy_SVertex *self, PyObject *value, void * /*closure*/) { float v[3]; if (mathutils_array_parse(v, 3, 3, value, "value must be a 3-dimensional vector") == -1) { @@ -287,13 +289,13 @@ PyDoc_STRVAR(SVertex_point_2d_doc, "\n" ":type: :class:`mathutils.Vector`"); -static PyObject *SVertex_point_2d_get(BPy_SVertex *self, void *UNUSED(closure)) +static PyObject *SVertex_point_2d_get(BPy_SVertex *self, void * /*closure*/) { return Vector_CreatePyObject_cb( (PyObject *)self, 3, SVertex_mathutils_cb_index, MATHUTILS_SUBTYPE_POINT2D); } -static int SVertex_point_2d_set(BPy_SVertex *self, PyObject *value, void *UNUSED(closure)) +static int SVertex_point_2d_set(BPy_SVertex *self, PyObject *value, void * /*closure*/) { float v[3]; if (mathutils_array_parse(v, 3, 3, value, "value must be a 3-dimensional vector") == -1) { @@ -309,13 +311,13 @@ PyDoc_STRVAR(SVertex_id_doc, "\n" ":type: :class:`Id`"); -static PyObject *SVertex_id_get(BPy_SVertex *self, void *UNUSED(closure)) +static PyObject *SVertex_id_get(BPy_SVertex *self, void * /*closure*/) { Id id(self->sv->getId()); return BPy_Id_from_Id(id); // return a copy } -static int SVertex_id_set(BPy_SVertex *self, PyObject *value, void *UNUSED(closure)) +static int SVertex_id_set(BPy_SVertex *self, PyObject *value, void * /*closure*/) { if (!BPy_Id_Check(value)) { PyErr_SetString(PyExc_TypeError, "value must be an Id"); @@ -332,13 +334,13 @@ PyDoc_STRVAR(SVertex_normals_doc, "\n" ":type: list of :class:`mathutils.Vector` objects"); -static PyObject *SVertex_normals_get(BPy_SVertex *self, void *UNUSED(closure)) +static PyObject *SVertex_normals_get(BPy_SVertex *self, void * /*closure*/) { PyObject *py_normals; set<Vec3r> normals = self->sv->normals(); set<Vec3r>::iterator it; py_normals = PyList_New(normals.size()); - unsigned int i = 0; + uint i = 0; for (it = normals.begin(); it != normals.end(); it++) { Vec3r v(*it); @@ -352,7 +354,7 @@ PyDoc_STRVAR(SVertex_normals_size_doc, "\n" ":type: int"); -static PyObject *SVertex_normals_size_get(BPy_SVertex *self, void *UNUSED(closure)) +static PyObject *SVertex_normals_size_get(BPy_SVertex *self, void * /*closure*/) { return PyLong_FromLong(self->sv->normalsSize()); } @@ -363,7 +365,7 @@ PyDoc_STRVAR(SVertex_viewvertex_doc, "\n" ":type: :class:`ViewVertex`"); -static PyObject *SVertex_viewvertex_get(BPy_SVertex *self, void *UNUSED(closure)) +static PyObject *SVertex_viewvertex_get(BPy_SVertex *self, void * /*closure*/) { ViewVertex *vv = self->sv->viewvertex(); if (vv) { @@ -385,7 +387,7 @@ PyDoc_STRVAR(SVertex_curvatures_doc, "\n" ":type: tuple"); -static PyObject *SVertex_curvatures_get(BPy_SVertex *self, void *UNUSED(closure)) +static PyObject *SVertex_curvatures_get(BPy_SVertex *self, void * /*closure*/) { const CurvatureInfo *info = self->sv->getCurvatureInfo(); if (!info) { |