Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Selten <michel@mselten.demon.nl>2003-09-17 22:15:51 +0400
committerMichel Selten <michel@mselten.demon.nl>2003-09-17 22:15:51 +0400
commitda773eee1811900c6250629baa9b923c11591930 (patch)
treeac7f4bc5b16d2dfa02bc4c0296195a047132f3a3
parent86409f2da65b177ad255540dcd45a0a5433a390f (diff)
* Fix bug in Object.getEuler() and Object.setEuler() methods
I must have been looking outside when writing those functions :) They accessed the dloc values instead of the loc values. Doh * Minor cleanup in Object.h
-rw-r--r--source/blender/python/api2_2x/Object.c20
-rw-r--r--source/blender/python/api2_2x/Object.h2
2 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index eca922291ce..9bc043b63c9 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -668,9 +668,9 @@ static PyObject *Object_getDrawType (BPy_Object *self)
static PyObject *Object_getEuler (BPy_Object *self)
{
PyObject *attr = Py_BuildValue ("fff",
- self->object->drot[0],
- self->object->drot[1],
- self->object->drot[2]);
+ self->object->rot[0],
+ self->object->rot[1],
+ self->object->rot[2]);
if (attr) return (attr);
@@ -992,19 +992,19 @@ static PyObject *Object_setDrawType (BPy_Object *self, PyObject *args)
static PyObject *Object_setEuler (BPy_Object *self, PyObject *args)
{
- float drot1;
- float drot2;
- float drot3;
+ float rot1;
+ float rot2;
+ float rot3;
- if (!PyArg_ParseTuple (args, "fff", &drot1, &drot2, &drot3))
+ if (!PyArg_ParseTuple (args, "fff", &rot1, &rot2, &rot3))
{
return (PythonReturnErrorObject (PyExc_AttributeError,
"expected three float arguments"));
}
- self->object->drot[0] = drot1;
- self->object->drot[1] = drot2;
- self->object->drot[2] = drot3;
+ self->object->rot[0] = rot1;
+ self->object->rot[1] = rot2;
+ self->object->rot[2] = rot3;
Py_INCREF (Py_None);
return (Py_None);
diff --git a/source/blender/python/api2_2x/Object.h b/source/blender/python/api2_2x/Object.h
index 5cf7513a6e9..c12a94c758e 100644
--- a/source/blender/python/api2_2x/Object.h
+++ b/source/blender/python/api2_2x/Object.h
@@ -66,8 +66,6 @@ extern PyTypeObject Object_Type;
/*****************************************************************************/
/* Python BPy_Object structure definition. */
/*****************************************************************************/
-struct BPy_Object;
-
typedef struct {
PyObject_HEAD
struct Object * object;