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:
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp')
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp31
1 files changed, 14 insertions, 17 deletions
diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
index 1c1d8bf032a..35eb95c6f23 100644
--- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
@@ -153,8 +153,8 @@ static int StrokeVertex_mathutils_check(BaseMathObject *bmo)
static int StrokeVertex_mathutils_get(BaseMathObject *bmo, int /*subtype*/)
{
BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user;
- bmo->data[0] = (float)self->sv->x();
- bmo->data[1] = (float)self->sv->y();
+ bmo->data[0] = float(self->sv->x());
+ bmo->data[1] = float(self->sv->y());
return 0;
}
@@ -171,10 +171,10 @@ static int StrokeVertex_mathutils_get_index(BaseMathObject *bmo, int /*subtype*/
BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user;
switch (index) {
case 0:
- bmo->data[0] = (float)self->sv->x();
+ bmo->data[0] = float(self->sv->x());
break;
case 1:
- bmo->data[1] = (float)self->sv->y();
+ bmo->data[1] = float(self->sv->y());
break;
default:
return -1;
@@ -206,7 +206,7 @@ static Mathutils_Callback StrokeVertex_mathutils_cb = {
StrokeVertex_mathutils_set_index,
};
-static unsigned char StrokeVertex_mathutils_cb_index = -1;
+static uchar StrokeVertex_mathutils_cb_index = -1;
void StrokeVertex_mathutils_register_callback()
{
@@ -220,14 +220,12 @@ PyDoc_STRVAR(StrokeVertex_attribute_doc,
"\n"
":type: :class:`StrokeAttribute`");
-static PyObject *StrokeVertex_attribute_get(BPy_StrokeVertex *self, void *UNUSED(closure))
+static PyObject *StrokeVertex_attribute_get(BPy_StrokeVertex *self, void * /*closure*/)
{
return BPy_StrokeAttribute_from_StrokeAttribute(self->sv->attribute());
}
-static int StrokeVertex_attribute_set(BPy_StrokeVertex *self,
- PyObject *value,
- void *UNUSED(closure))
+static int StrokeVertex_attribute_set(BPy_StrokeVertex *self, PyObject *value, void * /*closure*/)
{
if (!BPy_StrokeAttribute_Check(value)) {
PyErr_SetString(PyExc_TypeError, "value must be a StrokeAttribute object");
@@ -242,15 +240,14 @@ PyDoc_STRVAR(StrokeVertex_curvilinear_abscissa_doc,
"\n"
":type: float");
-static PyObject *StrokeVertex_curvilinear_abscissa_get(BPy_StrokeVertex *self,
- void *UNUSED(closure))
+static PyObject *StrokeVertex_curvilinear_abscissa_get(BPy_StrokeVertex *self, void * /*closure*/)
{
return PyFloat_FromDouble(self->sv->curvilinearAbscissa());
}
static int StrokeVertex_curvilinear_abscissa_set(BPy_StrokeVertex *self,
PyObject *value,
- void *UNUSED(closure))
+ void * /*closure*/)
{
float scalar;
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
@@ -267,12 +264,12 @@ PyDoc_STRVAR(StrokeVertex_point_doc,
"\n"
":type: :class:`mathutils.Vector`");
-static PyObject *StrokeVertex_point_get(BPy_StrokeVertex *self, void *UNUSED(closure))
+static PyObject *StrokeVertex_point_get(BPy_StrokeVertex *self, void * /*closure*/)
{
return Vector_CreatePyObject_cb((PyObject *)self, 2, StrokeVertex_mathutils_cb_index, 0);
}
-static int StrokeVertex_point_set(BPy_StrokeVertex *self, PyObject *value, void *UNUSED(closure))
+static int StrokeVertex_point_set(BPy_StrokeVertex *self, PyObject *value, void * /*closure*/)
{
float v[2];
if (mathutils_array_parse(v, 2, 2, value, "value must be a 2-dimensional vector") == -1) {
@@ -289,14 +286,14 @@ PyDoc_STRVAR(StrokeVertex_stroke_length_doc,
"\n"
":type: float");
-static PyObject *StrokeVertex_stroke_length_get(BPy_StrokeVertex *self, void *UNUSED(closure))
+static PyObject *StrokeVertex_stroke_length_get(BPy_StrokeVertex *self, void * /*closure*/)
{
return PyFloat_FromDouble(self->sv->strokeLength());
}
static int StrokeVertex_stroke_length_set(BPy_StrokeVertex *self,
PyObject *value,
- void *UNUSED(closure))
+ void * /*closure*/)
{
float scalar;
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
@@ -313,7 +310,7 @@ PyDoc_STRVAR(StrokeVertex_u_doc,
"\n"
":type: float");
-static PyObject *StrokeVertex_u_get(BPy_StrokeVertex *self, void *UNUSED(closure))
+static PyObject *StrokeVertex_u_get(BPy_StrokeVertex *self, void * /*closure*/)
{
return PyFloat_FromDouble(self->sv->u());
}