diff options
Diffstat (limited to 'source/blender/freestyle/intern/python')
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 03f9760344b..29e90ee4ebc 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -648,10 +648,10 @@ static bool float_array_from_PyList(PyObject *obj, float *v, int n) v[i] = PyFloat_AsDouble(PyList_GET_ITEM(obj, i)); if (v[i] == -1.0f && PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "list elements must be a number"); - return 0; + return false; } } - return 1; + return true; } bool Vec2f_ptr_from_PyList(PyObject *obj, Vec2f &vec) @@ -707,10 +707,10 @@ static bool float_array_from_PyTuple(PyObject *obj, float *v, int n) v[i] = PyFloat_AsDouble(PyTuple_GET_ITEM(obj, i)); if (v[i] == -1.0f && PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "tuple elements must be a number"); - return 0; + return false; } } - return 1; + return true; } bool Vec2f_ptr_from_PyTuple(PyObject *obj, Vec2f &vec) @@ -766,21 +766,21 @@ bool float_array_from_PyObject(PyObject *obj, float *v, int n) { if (VectorObject_Check(obj) && ((VectorObject *)obj)->size == n) { if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) { - return 0; + return false; } for (int i = 0; i < n; i++) { v[i] = ((VectorObject *)obj)->vec[i]; } - return 1; + return true; } if (ColorObject_Check(obj) && n == 3) { if (BaseMath_ReadCallback((BaseMathObject *)obj) == -1) { - return 0; + return false; } for (int i = 0; i < n; i++) { v[i] = ((ColorObject *)obj)->col[i]; } - return 1; + return true; } if (PyList_Check(obj) && PyList_GET_SIZE(obj) == n) { return float_array_from_PyList(obj, v, n); @@ -788,7 +788,7 @@ bool float_array_from_PyObject(PyObject *obj, float *v, int n) if (PyTuple_Check(obj) && PyTuple_GET_SIZE(obj) == n) { return float_array_from_PyTuple(obj, v, n); } - return 0; + return false; } int convert_v4(PyObject *obj, void *v) diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 9796dcda964..631bdc8bc28 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -268,7 +268,7 @@ static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject * /* disable extrapolation if enabled */ if ((cumap->flag & CUMA_EXTEND_EXTRAPOLATE)) { cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE; - BKE_curvemapping_changed(cumap, 0); + BKE_curvemapping_changed(cumap, false); } return PyFloat_FromDouble(BKE_curvemapping_evaluateF(cumap, cur, value)); } diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index 3efabbfbdf5..bc994e7542c 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -495,7 +495,7 @@ static PyObject *BPy_FrsMaterial_richcmpr(PyObject *objectA, int comparison_type) { const BPy_FrsMaterial *matA = NULL, *matB = NULL; - bool result = 0; + bool result = false; if (!BPy_FrsMaterial_Check(objectA) || !BPy_FrsMaterial_Check(objectB)) { if (comparison_type == Py_NE) { |