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.

This commit is contained in:
2012-03-30 11:35:58 +00:00
parent 785373b03a
commit 89b83f0060
7 changed files with 49 additions and 3 deletions

View File

@@ -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 */