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>2012-03-30 15:35:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-30 15:35:58 +0400
commit89b83f00608dfb2a7750476035f0635885473d21 (patch)
tree4f11557bb830061c37826aacb6fa54f8213cd609 /source/blender/python/mathutils/mathutils_Euler.c
parent785373b03abd7bfd258a50a0f274c81229fbf98a (diff)
patch to add __deepcopy__ to mathutils types, this is no different to __copy__, except some py utilities expect __deepcopy__ to exist, so better have them.
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Euler.c')
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index ecd0cee03b5..4e3b5f8d52e 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -299,6 +299,12 @@ static PyObject *Euler_copy(EulerObject *self)
return Euler_CreatePyObject(self->eul, self->order, Py_NEW, Py_TYPE(self));
}
+static PyObject *Euler_deepcopy(EulerObject *self, PyObject *args)
+{
+ if (!mathutils_deepcopy_args_check(args))
+ return NULL;
+ return Euler_copy(self);
+}
//----------------------------print object (internal)--------------
//print the object to screen
@@ -632,8 +638,9 @@ static struct PyMethodDef Euler_methods[] = {
{"rotate_axis", (PyCFunction) Euler_rotate_axis, METH_VARARGS, Euler_rotate_axis_doc},
{"rotate", (PyCFunction) Euler_rotate, METH_O, Euler_rotate_doc},
{"make_compatible", (PyCFunction) Euler_make_compatible, METH_O, Euler_make_compatible_doc},
- {"__copy__", (PyCFunction) Euler_copy, METH_NOARGS, Euler_copy_doc},
{"copy", (PyCFunction) Euler_copy, METH_NOARGS, Euler_copy_doc},
+ {"__copy__", (PyCFunction) Euler_copy, METH_NOARGS, Euler_copy_doc},
+ {"__deepcopy__", (PyCFunction) Euler_deepcopy, METH_VARARGS, Euler_copy_doc},
{NULL, NULL, 0, NULL}
};