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>2021-09-03 14:18:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-09-03 14:21:44 +0300
commit0950cfd9d53ef666cf820765e83586f72b04e9b6 (patch)
tree1426c078d128770f493a1444fa16f07cd6d41c4b /source/blender/python/mathutils/mathutils_Euler.c
parentf530b435501b36ea5621eacbd2624db11864b8c3 (diff)
PyAPI: add read-only 'is_valid' attribute to mathutils types
There was no convenient way to check if the owner of a mathutils type was valid. Added to support issue reported in T91111.
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Euler.c')
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index 595d03b533b..1033d186fca 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -699,6 +699,11 @@ static PyGetSetDef Euler_getseters[] = {
(setter)NULL,
BaseMathObject_is_frozen_doc,
NULL},
+ {"is_valid",
+ (getter)BaseMathObject_is_valid_get,
+ (setter)NULL,
+ BaseMathObject_is_valid_doc,
+ NULL},
{"owner", (getter)BaseMathObject_owner_get, (setter)NULL, BaseMathObject_owner_doc, NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};