diff --git a/release/scripts/op/add_mesh_torus.py b/release/scripts/op/add_mesh_torus.py index d1989db2832..f9ca0f60468 100644 --- a/release/scripts/op/add_mesh_torus.py +++ b/release/scripts/op/add_mesh_torus.py @@ -42,7 +42,7 @@ def add_torus(major_rad, minor_rad, major_seg, minor_seg): vec = Vector((major_rad + (cos(angle) * minor_rad), 0.0, (sin(angle) * minor_rad))) * quat - verts.extend([vec.x, vec.y, vec.z]) + verts.extend(vec[:]) if minor_index + 1 == minor_seg: i2 = (major_index) * minor_seg diff --git a/source/blender/python/generic/mathutils_quat.c b/source/blender/python/generic/mathutils_quat.c index a1a5c4b2ccb..c39e6ee5587 100644 --- a/source/blender/python/generic/mathutils_quat.c +++ b/source/blender/python/generic/mathutils_quat.c @@ -798,7 +798,7 @@ static PyObject *Quaternion_getAxisVec( QuaternionObject * self, void *type ) static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *seq= NULL; - double angle = 0.0f; + float angle = 0.0f; float quat[QUAT_SIZE]= {0.0f, 0.0f, 0.0f, 0.0f}; if(!PyArg_ParseTuple(args, "|Of:mathutils.Quaternion", &seq, &angle)) @@ -814,6 +814,7 @@ static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kw case 2: if (mathutils_array_parse(quat, 3, 3, seq, "mathutils.Quaternion()") == -1) return NULL; + axis_angle_to_quat(quat, quat, angle); break; /* PyArg_ParseTuple assures no more then 2 */