diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_SShape.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_SShape.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index fb72ed0ca62..92867e36479 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -12,6 +12,8 @@ #include "Interface0D/BPy_SVertex.h" #include "Interface1D/BPy_FEdge.h" +#include "BLI_sys_types.h" + #ifdef __cplusplus extern "C" { #endif @@ -155,13 +157,13 @@ PyDoc_STRVAR(SShape_id_doc, "\n" ":type: :class:`Id`"); -static PyObject *SShape_id_get(BPy_SShape *self, void *UNUSED(closure)) +static PyObject *SShape_id_get(BPy_SShape *self, void * /*closure*/) { Id id(self->ss->getId()); return BPy_Id_from_Id(id); // return a copy } -static int SShape_id_set(BPy_SShape *self, PyObject *value, void *UNUSED(closure)) +static int SShape_id_set(BPy_SShape *self, PyObject *value, void * /*closure*/) { if (!BPy_Id_Check(value)) { PyErr_SetString(PyExc_TypeError, "value must be an Id"); @@ -176,12 +178,12 @@ PyDoc_STRVAR(SShape_name_doc, "\n" ":type: str"); -static PyObject *SShape_name_get(BPy_SShape *self, void *UNUSED(closure)) +static PyObject *SShape_name_get(BPy_SShape *self, void * /*closure*/) { return PyUnicode_FromString(self->ss->getName().c_str()); } -static int SShape_name_set(BPy_SShape *self, PyObject *value, void *UNUSED(closure)) +static int SShape_name_set(BPy_SShape *self, PyObject *value, void * /*closure*/) { if (!PyUnicode_Check(value)) { PyErr_SetString(PyExc_TypeError, "value must be a string"); @@ -197,13 +199,13 @@ PyDoc_STRVAR(SShape_bbox_doc, "\n" ":type: :class:`BBox`"); -static PyObject *SShape_bbox_get(BPy_SShape *self, void *UNUSED(closure)) +static PyObject *SShape_bbox_get(BPy_SShape *self, void * /*closure*/) { BBox<Vec3r> bb(self->ss->bbox()); return BPy_BBox_from_BBox(bb); // return a copy } -static int SShape_bbox_set(BPy_SShape *self, PyObject *value, void *UNUSED(closure)) +static int SShape_bbox_set(BPy_SShape *self, PyObject *value, void * /*closure*/) { if (!BPy_BBox_Check(value)) { PyErr_SetString(PyExc_TypeError, "value must be a BBox"); @@ -218,13 +220,13 @@ PyDoc_STRVAR(SShape_vertices_doc, "\n" ":type: List of :class:`SVertex` objects"); -static PyObject *SShape_vertices_get(BPy_SShape *self, void *UNUSED(closure)) +static PyObject *SShape_vertices_get(BPy_SShape *self, void * /*closure*/) { vector<SVertex *> vertices = self->ss->getVertexList(); vector<SVertex *>::iterator it; PyObject *py_vertices = PyList_New(vertices.size()); - unsigned int i = 0; + uint i = 0; for (it = vertices.begin(); it != vertices.end(); it++) { PyList_SET_ITEM(py_vertices, i++, BPy_SVertex_from_SVertex(*(*it))); @@ -238,13 +240,13 @@ PyDoc_STRVAR(SShape_edges_doc, "\n" ":type: List of :class:`FEdge` objects"); -static PyObject *SShape_edges_get(BPy_SShape *self, void *UNUSED(closure)) +static PyObject *SShape_edges_get(BPy_SShape *self, void * /*closure*/) { vector<FEdge *> edges = self->ss->getEdgeList(); vector<FEdge *>::iterator it; PyObject *py_edges = PyList_New(edges.size()); - unsigned int i = 0; + uint i = 0; for (it = edges.begin(); it != edges.end(); it++) { PyList_SET_ITEM(py_edges, i++, Any_BPy_FEdge_from_FEdge(*(*it))); |