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:
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Euler.c')
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index f49868dfba7..ddc0f115742 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -32,10 +32,10 @@ static const char *euler_order_str(EulerObject *self)
short euler_order_from_string(const char *str, const char *error_prefix)
{
- if ((str[0] && str[1] && str[2] && str[3] == '\0')) {
+ if (str[0] && str[1] && str[2] && str[3] == '\0') {
#ifdef __LITTLE_ENDIAN__
-# define MAKE_ID3(a, b, c) (((a)) | ((b) << 8) | ((c) << 16))
+# define MAKE_ID3(a, b, c) ((a) | ((b) << 8) | ((c) << 16))
#else
# define MAKE_ID3(a, b, c) (((a) << 24) | ((b) << 16) | ((c) << 8))
#endif
@@ -215,7 +215,7 @@ static PyObject *Euler_rotate_axis(EulerObject *self, PyObject *args)
return NULL;
}
- if (!(ELEM(axis, 'X', 'Y', 'Z'))) {
+ if (!ELEM(axis, 'X', 'Y', 'Z')) {
PyErr_SetString(PyExc_ValueError,
"Euler.rotate_axis(): "
"expected axis to be 'X', 'Y' or 'Z'");
@@ -774,9 +774,9 @@ PyDoc_STRVAR(
"\n"
" .. seealso:: `Euler angles <https://en.wikipedia.org/wiki/Euler_angles>`__ on Wikipedia.\n"
"\n"
- " :param angles: Three angles, in radians.\n"
+ " :arg angles: Three angles, in radians.\n"
" :type angles: 3d vector\n"
- " :param order: Optional order of the angles, a permutation of ``XYZ``.\n"
+ " :arg order: Optional order of the angles, a permutation of ``XYZ``.\n"
" :type order: str\n");
PyTypeObject euler_Type = {
PyVarObject_HEAD_INIT(NULL, 0) "Euler", /* tp_name */
@@ -821,7 +821,7 @@ PyTypeObject euler_Type = {
NULL, /* tp_alloc */
Euler_new, /* tp_new */
NULL, /* tp_free */
- NULL, /* tp_is_gc */
+ (inquiry)BaseMathObject_is_gc, /* tp_is_gc */
NULL, /* tp_bases */
NULL, /* tp_mro */
NULL, /* tp_cache */
@@ -904,6 +904,7 @@ PyObject *Euler_CreatePyObject_cb(PyObject *cb_user,
self->cb_user = cb_user;
self->cb_type = cb_type;
self->cb_subtype = cb_subtype;
+ BLI_assert(!PyObject_GC_IsTracked((PyObject *)self));
PyObject_GC_Track(self);
}