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.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.c')
-rw-r--r--source/blender/python/mathutils/mathutils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 5d3de702fb4..5f9e68f07d8 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -282,6 +282,13 @@ PyObject *mathutils_dynstr_to_py(struct DynStr *ds)
return ret;
}
+/* silly function, we dont use arg. just check its compatible with __deepcopy__ */
+int mathutils_deepcopy_args_check(PyObject *args)
+{
+ PyObject *dummy_pydict;
+ return PyArg_ParseTuple(args, "|O!:__deepcopy__", &PyDict_Type, &dummy_pydict) != 0;
+}
+
/* Mathutils Callbacks */
/* for mathutils internal use only, eventually should re-alloc but to start with we only have a few users */