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:
authorCampbell Barton <ideasman42@gmail.com>2006-08-22 13:13:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-08-22 13:13:44 +0400
commitd6d2d6f063994e1481ce498c5e245d8470ef4b6d (patch)
tree07896859c3e6edf3d0a6ed5595ee4724606ea96c /source/blender/python/api2_2x/euler.c
parent18ab4ff62dadc836ad3e302b9253d4257a889a49 (diff)
added fakeUser property to mesh (will need to add to all other library datablocks too)
and added __copy__ to quat and euler types as well as updating the docs.
Diffstat (limited to 'source/blender/python/api2_2x/euler.c')
-rw-r--r--source/blender/python/api2_2x/euler.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/euler.c b/source/blender/python/api2_2x/euler.c
index 99855f93b0d..6956bf42ffe 100644
--- a/source/blender/python/api2_2x/euler.c
+++ b/source/blender/python/api2_2x/euler.c
@@ -43,6 +43,7 @@ char Euler_Unique_doc[] ="() - sets the euler rotation a unique shortest arc rot
char Euler_ToMatrix_doc[] = "() - returns a rotation matrix representing the euler rotation";
char Euler_ToQuat_doc[] = "() - returns a quaternion representing the euler rotation";
char Euler_Rotate_doc[] = "() - rotate a euler by certain amount around an axis of rotation";
+char Euler_copy_doc[] = "() - returns a copy of the euler.";
//-----------------------METHOD DEFINITIONS ----------------------
struct PyMethodDef Euler_methods[] = {
{"zero", (PyCFunction) Euler_Zero, METH_NOARGS, Euler_Zero_doc},
@@ -50,6 +51,8 @@ struct PyMethodDef Euler_methods[] = {
{"toMatrix", (PyCFunction) Euler_ToMatrix, METH_NOARGS, Euler_ToMatrix_doc},
{"toQuat", (PyCFunction) Euler_ToQuat, METH_NOARGS, Euler_ToQuat_doc},
{"rotate", (PyCFunction) Euler_Rotate, METH_VARARGS, Euler_Rotate_doc},
+ {"__copy__", (PyCFunction) Euler_copy, METH_VARARGS, Euler_copy_doc},
+ {"copy", (PyCFunction) Euler_copy, METH_VARARGS, Euler_copy_doc},
{NULL, NULL, 0, NULL}
};
//-----------------------------METHODS----------------------------
@@ -171,6 +174,14 @@ PyObject *Euler_Rotate(EulerObject * self, PyObject *args)
return EXPP_incr_ret((PyObject*)self);
}
+//----------------------------Euler.rotate()-----------------------
+// return a copy of the euler
+PyObject *Euler_copy(EulerObject * self, PyObject *args)
+{
+ return newEulerObject(self->eul, Py_NEW);
+}
+
+
//----------------------------dealloc()(internal) ------------------
//free the py_object
static void Euler_dealloc(EulerObject * self)