diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2013-12-11 13:31:58 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2013-12-11 16:28:30 +0400 |
commit | c35fb528c5337b8c4597802b47ad96d7295d476b (patch) | |
tree | ba5e78b80f547871f5854c5cf3dce25cc8011b50 /source/blender/python/mathutils/mathutils_geometry.c | |
parent | 1f05d71e24ae75800883526e0a64a94097aae210 (diff) |
Fix intersect_line_plane bug causing crash on Motion trail and other
similar potential bugs in mathutils_geometry
marking no_flip as TODO
Diffstat (limited to 'source/blender/python/mathutils/mathutils_geometry.c')
-rw-r--r-- | source/blender/python/mathutils/mathutils_geometry.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c index 9cbff45ffa1..53e428cf73c 100644 --- a/source/blender/python/mathutils/mathutils_geometry.c +++ b/source/blender/python/mathutils/mathutils_geometry.c @@ -576,12 +576,14 @@ static PyObject *M_Geometry_intersect_line_plane(PyObject *UNUSED(self), PyObjec { VectorObject *line_a, *line_b, *plane_co, *plane_no; float isect[3]; + int no_flip = false; if (!PyArg_ParseTuple(args, "O!O!O!O!|i:intersect_line_plane", &vector_Type, &line_a, &vector_Type, &line_b, &vector_Type, &plane_co, - &vector_Type, &plane_no)) + &vector_Type, &plane_no, + &no_flip)) { return NULL; } @@ -601,6 +603,7 @@ static PyObject *M_Geometry_intersect_line_plane(PyObject *UNUSED(self), PyObjec return NULL; } + /* TODO: implements no_flip */ if (isect_line_plane_v3(isect, line_a->vec, line_b->vec, plane_co->vec, plane_no->vec) == 1) { return Vector_CreatePyObject(isect, 3, Py_NEW, NULL); } @@ -633,7 +636,7 @@ static PyObject *M_Geometry_intersect_plane_plane(PyObject *UNUSED(self), PyObje float isect_co[3]; float isect_no[3]; - if (!PyArg_ParseTuple(args, "O!O!O!O!|i:intersect_plane_plane", + if (!PyArg_ParseTuple(args, "O!O!O!O!:intersect_plane_plane", &vector_Type, &plane_a_co, &vector_Type, &plane_a_no, &vector_Type, &plane_b_co, |