diff options
Diffstat (limited to 'source/blender/freestyle/intern/python')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Interface1D.cpp | 2 | ||||
-rw-r--r-- | source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index fbe81d26e79..1a353c2174f 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -278,7 +278,7 @@ static PyObject *Interface1D_length_2d_get(BPy_Interface1D *self, void *UNUSED(c if (PyErr_Occurred()) { return nullptr; } - return PyFloat_FromDouble((double)length); + return PyFloat_FromDouble(double(length)); } PyDoc_STRVAR(Interface1D_time_stamp_doc, 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 54996067e72..228be7f4f76 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; |