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/quat.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/quat.c')
-rw-r--r--source/blender/python/api2_2x/quat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/quat.c b/source/blender/python/api2_2x/quat.c
index af778d27f07..43aa7422101 100644
--- a/source/blender/python/api2_2x/quat.c
+++ b/source/blender/python/api2_2x/quat.c
@@ -45,6 +45,7 @@ char Quaternion_Inverse_doc[] = "() - set the quaternion to it's inverse";
char Quaternion_Normalize_doc[] = "() - normalize the vector portion of the quaternion";
char Quaternion_ToEuler_doc[] = "() - return a euler rotation representing the quaternion";
char Quaternion_ToMatrix_doc[] = "() - return a rotation matrix representing the quaternion";
+char Quaternion_copy_doc[] = "() - return a copy of the quat";
//-----------------------METHOD DEFINITIONS ----------------------
struct PyMethodDef Quaternion_methods[] = {
{"identity", (PyCFunction) Quaternion_Identity, METH_NOARGS, Quaternion_Identity_doc},
@@ -54,6 +55,8 @@ struct PyMethodDef Quaternion_methods[] = {
{"normalize", (PyCFunction) Quaternion_Normalize, METH_NOARGS, Quaternion_Normalize_doc},
{"toEuler", (PyCFunction) Quaternion_ToEuler, METH_NOARGS, Quaternion_ToEuler_doc},
{"toMatrix", (PyCFunction) Quaternion_ToMatrix, METH_NOARGS, Quaternion_ToMatrix_doc},
+ {"__copy__", (PyCFunction) Quaternion_copy, METH_NOARGS, Quaternion_copy_doc},
+ {"copy", (PyCFunction) Quaternion_copy, METH_NOARGS, Quaternion_copy_doc},
{NULL, NULL, 0, NULL}
};
//-----------------------------METHODS------------------------------
@@ -137,6 +140,13 @@ PyObject *Quaternion_Conjugate(QuaternionObject * self)
}
return EXPP_incr_ret((PyObject*)self);
}
+//----------------------------Quaternion.copy()----------------
+//return a copy of the quat
+PyObject *Quaternion_copy(QuaternionObject * self)
+{
+ return newQuaternionObject(self->quat, Py_NEW);
+}
+
//----------------------------dealloc()(internal) ------------------
//free the py_object
static void Quaternion_dealloc(QuaternionObject * self)