diff options
Diffstat (limited to 'source/blender/freestyle')
6 files changed, 39 insertions, 39 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 8dcad1ff769..9a28189fe3e 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -512,7 +512,7 @@ Nature::EdgeNature EdgeNature_from_BPy_Nature(PyObject *obj) return static_cast<Nature::EdgeNature>(PyLong_AsLong(obj)); } -bool Vec2f_ptr_from_PyObject(PyObject *obj, Vec2f *vec) +bool Vec2f_ptr_from_PyObject(PyObject *obj, Vec2f &vec) { if (Vec2f_ptr_from_Vector(obj, vec)) return true; @@ -523,7 +523,7 @@ bool Vec2f_ptr_from_PyObject(PyObject *obj, Vec2f *vec) return false; } -bool Vec3f_ptr_from_PyObject(PyObject *obj, Vec3f *vec) +bool Vec3f_ptr_from_PyObject(PyObject *obj, Vec3f &vec) { if (Vec3f_ptr_from_Vector(obj, vec)) return true; @@ -536,7 +536,7 @@ bool Vec3f_ptr_from_PyObject(PyObject *obj, Vec3f *vec) return false; } -bool Vec3r_ptr_from_PyObject(PyObject *obj, Vec3r *vec) +bool Vec3r_ptr_from_PyObject(PyObject *obj, Vec3r &vec) { if (Vec3r_ptr_from_Vector(obj, vec)) return true; @@ -549,7 +549,7 @@ bool Vec3r_ptr_from_PyObject(PyObject *obj, Vec3r *vec) return false; } -bool Vec2f_ptr_from_Vector(PyObject *obj, Vec2f *vec) +bool Vec2f_ptr_from_Vector(PyObject *obj, Vec2f &vec) { if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 2) return false; @@ -560,7 +560,7 @@ bool Vec2f_ptr_from_Vector(PyObject *obj, Vec2f *vec) return true; } -bool Vec3f_ptr_from_Vector(PyObject *obj, Vec3f *vec) +bool Vec3f_ptr_from_Vector(PyObject *obj, Vec3f &vec) { if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3) return false; @@ -572,7 +572,7 @@ bool Vec3f_ptr_from_Vector(PyObject *obj, Vec3f *vec) return true; } -bool Vec3r_ptr_from_Vector(PyObject *obj, Vec3r *vec) +bool Vec3r_ptr_from_Vector(PyObject *obj, Vec3r &vec) { if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3) return false; @@ -584,7 +584,7 @@ bool Vec3r_ptr_from_Vector(PyObject *obj, Vec3r *vec) return true; } -bool Vec3f_ptr_from_Color(PyObject *obj, Vec3f *vec) +bool Vec3f_ptr_from_Color(PyObject *obj, Vec3f &vec) { if (!ColorObject_Check(obj)) return false; @@ -596,7 +596,7 @@ bool Vec3f_ptr_from_Color(PyObject *obj, Vec3f *vec) return true; } -bool Vec3r_ptr_from_Color(PyObject *obj, Vec3r *vec) +bool Vec3r_ptr_from_Color(PyObject *obj, Vec3r &vec) { if (!ColorObject_Check(obj)) return false; @@ -620,7 +620,7 @@ static bool float_array_from_PyList(PyObject *obj, float *v, int n) return 1; } -bool Vec2f_ptr_from_PyList(PyObject *obj, Vec2f *vec) +bool Vec2f_ptr_from_PyList(PyObject *obj, Vec2f &vec) { float v[2]; @@ -633,7 +633,7 @@ bool Vec2f_ptr_from_PyList(PyObject *obj, Vec2f *vec) return true; } -bool Vec3f_ptr_from_PyList(PyObject *obj, Vec3f *vec) +bool Vec3f_ptr_from_PyList(PyObject *obj, Vec3f &vec) { float v[3]; @@ -647,7 +647,7 @@ bool Vec3f_ptr_from_PyList(PyObject *obj, Vec3f *vec) return true; } -bool Vec3r_ptr_from_PyList(PyObject *obj, Vec3r *vec) +bool Vec3r_ptr_from_PyList(PyObject *obj, Vec3r &vec) { float v[3]; @@ -673,7 +673,7 @@ static bool float_array_from_PyTuple(PyObject *obj, float *v, int n) return 1; } -bool Vec2f_ptr_from_PyTuple(PyObject *obj, Vec2f *vec) +bool Vec2f_ptr_from_PyTuple(PyObject *obj, Vec2f &vec) { float v[2]; @@ -686,7 +686,7 @@ bool Vec2f_ptr_from_PyTuple(PyObject *obj, Vec2f *vec) return true; } -bool Vec3f_ptr_from_PyTuple(PyObject *obj, Vec3f *vec) +bool Vec3f_ptr_from_PyTuple(PyObject *obj, Vec3f &vec) { float v[3]; @@ -700,7 +700,7 @@ bool Vec3f_ptr_from_PyTuple(PyObject *obj, Vec3f *vec) return true; } -bool Vec3r_ptr_from_PyTuple(PyObject *obj, Vec3r *vec) +bool Vec3r_ptr_from_PyTuple(PyObject *obj, Vec3r &vec) { float v[3]; diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index b7e798dfa63..89171ef5152 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -150,20 +150,20 @@ bool bool_from_PyBool(PyObject *b); IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj); Stroke::MediumType MediumType_from_BPy_MediumType(PyObject *obj); Nature::EdgeNature EdgeNature_from_BPy_Nature(PyObject *obj); -bool Vec2f_ptr_from_PyObject(PyObject *obj, Vec2f *vec); -bool Vec3f_ptr_from_PyObject(PyObject *obj, Vec3f *vec); -bool Vec3r_ptr_from_PyObject(PyObject *obj, Vec3r *vec); -bool Vec2f_ptr_from_Vector(PyObject *obj, Vec2f *vec); -bool Vec3f_ptr_from_Vector(PyObject *obj, Vec3f *vec); -bool Vec3r_ptr_from_Vector(PyObject *obj, Vec3r *vec); -bool Vec3f_ptr_from_Color(PyObject *obj, Vec3f *vec); -bool Vec3r_ptr_from_Color(PyObject *obj, Vec3r *vec); -bool Vec2f_ptr_from_PyList(PyObject *obj, Vec2f *vec); -bool Vec3f_ptr_from_PyList(PyObject *obj, Vec3f *vec); -bool Vec3r_ptr_from_PyList(PyObject *obj, Vec3r *vec); -bool Vec2f_ptr_from_PyTuple(PyObject *obj, Vec2f *vec); -bool Vec3f_ptr_from_PyTuple(PyObject *obj, Vec3f *vec); -bool Vec3r_ptr_from_PyTuple(PyObject *obj, Vec3r *vec); +bool Vec2f_ptr_from_PyObject(PyObject *obj, Vec2f &vec); +bool Vec3f_ptr_from_PyObject(PyObject *obj, Vec3f &vec); +bool Vec3r_ptr_from_PyObject(PyObject *obj, Vec3r &vec); +bool Vec2f_ptr_from_Vector(PyObject *obj, Vec2f &vec); +bool Vec3f_ptr_from_Vector(PyObject *obj, Vec3f &vec); +bool Vec3r_ptr_from_Vector(PyObject *obj, Vec3r &vec); +bool Vec3f_ptr_from_Color(PyObject *obj, Vec3f &vec); +bool Vec3r_ptr_from_Color(PyObject *obj, Vec3r &vec); +bool Vec2f_ptr_from_PyList(PyObject *obj, Vec2f &vec); +bool Vec3f_ptr_from_PyList(PyObject *obj, Vec3f &vec); +bool Vec3r_ptr_from_PyList(PyObject *obj, Vec3r &vec); +bool Vec2f_ptr_from_PyTuple(PyObject *obj, Vec2f &vec); +bool Vec3f_ptr_from_PyTuple(PyObject *obj, Vec3f &vec); +bool Vec3r_ptr_from_PyTuple(PyObject *obj, Vec3r &vec); bool float_array_from_PyObject(PyObject *obj, float *v, int n); diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp index 2575b16b27a..39e4aed7cc0 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp @@ -136,7 +136,7 @@ static PyObject *FrsNoise_turbulence2(BPy_FrsNoise *self, PyObject *args, PyObje if (!PyArg_ParseTupleAndKeywords(args, kwds, "Off|I", (char **)kwlist, &obj1, &f2, &f3, &i)) return NULL; - if (!Vec2f_ptr_from_PyObject(obj1, &vec)) { + if (!Vec2f_ptr_from_PyObject(obj1, vec)) { PyErr_SetString(PyExc_TypeError, "argument 1 must be a 2D vector (either a list of 2 elements or Vector)"); return NULL; } @@ -170,7 +170,7 @@ static PyObject *FrsNoise_turbulence3(BPy_FrsNoise *self, PyObject *args, PyObje if (!PyArg_ParseTupleAndKeywords(args, kwds, "Off|I", (char **)kwlist, &obj1, &f2, &f3, &i)) return NULL; - if (!Vec3f_ptr_from_PyObject(obj1, &vec)) { + if (!Vec3f_ptr_from_PyObject(obj1, vec)) { PyErr_SetString(PyExc_TypeError, "argument 1 must be a 3D vector (either a list of 3 elements or Vector)"); return NULL; } @@ -216,7 +216,7 @@ static PyObject *FrsNoise_smoothNoise2(BPy_FrsNoise *self, PyObject *args, PyObj if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) return NULL; - if (!Vec2f_ptr_from_PyObject(obj, &vec)) { + if (!Vec2f_ptr_from_PyObject(obj, vec)) { PyErr_SetString(PyExc_TypeError, "argument 1 must be a 2D vector (either a list of 2 elements or Vector)"); return NULL; } @@ -242,7 +242,7 @@ static PyObject *FrsNoise_smoothNoise3(BPy_FrsNoise *self, PyObject *args, PyObj if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &obj)) return NULL; - if (!Vec3f_ptr_from_PyObject(obj, &vec)) { + if (!Vec3f_ptr_from_PyObject(obj, vec)) { PyErr_SetString(PyExc_TypeError, "argument 1 must be a 3D vector (either a list of 3 elements or Vector)"); return NULL; } diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index b08fcfa8dba..f36cbafa61a 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -315,7 +315,7 @@ static PyObject * StrokeAttribute_set_attribute_vec2(BPy_StrokeAttribute *self, if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj)) return NULL; - if (!Vec2f_ptr_from_PyObject(obj, &vec)) { + if (!Vec2f_ptr_from_PyObject(obj, vec)) { PyErr_SetString(PyExc_TypeError, "argument 2 must be a 2D vector (either a list of 2 elements or Vector)"); return NULL; } @@ -344,7 +344,7 @@ static PyObject * StrokeAttribute_set_attribute_vec3(BPy_StrokeAttribute *self, if (!PyArg_ParseTupleAndKeywords(args, kwds, "sO", (char **)kwlist, &s, &obj)) return NULL; - if (!Vec3f_ptr_from_PyObject(obj, &vec)) { + if (!Vec3f_ptr_from_PyObject(obj, vec)) { PyErr_SetString(PyExc_TypeError, "argument 2 must be a 3D vector (either a list of 3 elements or Vector)"); return NULL; } diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp index 011609bb343..ed98bfee63f 100644 --- a/source/blender/freestyle/intern/python/Director.cpp +++ b/source/blender/freestyle/intern/python/Director.cpp @@ -252,13 +252,13 @@ int Director_BPy_UnaryFunction0D___call__(void *uf0D, PyObject *obj, Interface0D } else if (BPy_UnaryFunction0DVec2f_Check(obj)) { Vec2f vec; - if (!Vec2f_ptr_from_Vector(result, &vec)) + if (!Vec2f_ptr_from_Vector(result, vec)) return -1; ((UnaryFunction0D<Vec2f> *)uf0D)->result = vec; } else if (BPy_UnaryFunction0DVec3f_Check(obj)) { Vec3f vec; - if (!Vec3f_ptr_from_Vector(result, &vec)) + if (!Vec3f_ptr_from_Vector(result, vec)) return -1; ((UnaryFunction0D<Vec3f> *)uf0D)->result = vec; } @@ -304,13 +304,13 @@ int Director_BPy_UnaryFunction1D___call__(void *uf1D, PyObject *obj, Interface1D } else if (BPy_UnaryFunction1DVec2f_Check(obj)) { Vec2f vec; - if (!Vec2f_ptr_from_Vector(result, &vec)) + if (!Vec2f_ptr_from_Vector(result, vec)) return -1; ((UnaryFunction1D<Vec2f> *)uf1D)->result = vec; } else if (BPy_UnaryFunction1DVec3f_Check(obj)) { Vec3f vec; - if (!Vec3f_ptr_from_Vector(result, &vec)) + if (!Vec3f_ptr_from_Vector(result, vec)) return -1; ((UnaryFunction1D<Vec3f> *)uf1D)->result = vec; } diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index d2dd1657770..7ce34142c77 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -111,7 +111,7 @@ static PyObject *SVertex_add_normal(BPy_SVertex *self, PyObject *args, PyObject if (!PyArg_ParseTupleAndKeywords(args, kwds, "O", (char **)kwlist, &py_normal)) return NULL; - if (!Vec3r_ptr_from_PyObject(py_normal, &n)) { + if (!Vec3r_ptr_from_PyObject(py_normal, n)) { PyErr_SetString(PyExc_TypeError, "argument 1 must be a 3D vector (either a list of 3 elements or Vector)"); return NULL; } |