From 259acf5f667dbd3e21c30172eec5e06ef085012b Mon Sep 17 00:00:00 2001 From: Michel Selten <michel@mselten.demon.nl> Date: Sun, 25 Jan 2004 17:58:24 +0000 Subject: [PATCH] Python bug fix for #724 * Blender.Object.setDrawMode does not work. I had accidentally switched the variables for setDrawMode and setDrawType. This implied that _both_ functions did not work correctly. The functions getDrawMode and getDrawType use the correct variables. --- source/blender/python/api2_2x/Object.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 4a3f33fbe35..b2852438484 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -1144,14 +1144,14 @@ static PyObject *Object_setDeltaLocation (BPy_Object *self, PyObject *args) static PyObject *Object_setDrawMode (BPy_Object *self, PyObject *args) { - char dt; + char dtx; - if (!PyArg_ParseTuple (args, "b", &dt)) + if (!PyArg_ParseTuple (args, "b", &dtx)) { return (PythonReturnErrorObject (PyExc_AttributeError, "expected an integer as argument")); } - self->object->dt = dt; + self->object->dtx = dtx; Py_INCREF (Py_None); return (Py_None); @@ -1159,14 +1159,14 @@ static PyObject *Object_setDrawMode (BPy_Object *self, PyObject *args) static PyObject *Object_setDrawType (BPy_Object *self, PyObject *args) { - char dtx; + char dt; - if (!PyArg_ParseTuple (args, "b", &dtx)) + if (!PyArg_ParseTuple (args, "b", &dt)) { return (PythonReturnErrorObject (PyExc_AttributeError, "expected an integer as argument")); } - self->object->dtx = dtx; + self->object->dt = dt; Py_INCREF (Py_None); return (Py_None); -- GitLab