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.
This commit is contained in:
2021-09-03 21:18:03 +10:00
parent f530b43550
commit 0950cfd9d5
7 changed files with 46 additions and 0 deletions

View File

@@ -3148,6 +3148,11 @@ static PyGetSetDef Matrix_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 */
};