14#define PY_SSIZE_T_CLEAN
33#include "RNA_prototypes.hh"
54#define BPY_PROPDEF_OPTIONS_DOC \
55 " :arg options: Enumerator in :ref:`rna_enum_property_flag_items`.\n" \
56 " :type options: set[str]\n"
58#define BPY_PROPDEF_OPTIONS_ENUM_DOC \
59 " :arg options: Enumerator in :ref:`rna_enum_property_flag_enum_items`.\n" \
60 " :type options: set[str]\n"
62#define BPY_PROPDEF_OPTIONS_OVERRIDE_DOC \
63 " :arg override: Enumerator in :ref:`rna_enum_property_override_flag_items`.\n" \
64 " :type override: set[str]\n"
66#define BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC \
67 " :arg override: Enumerator in :ref:`rna_enum_property_override_flag_collection_items`.\n" \
68 " :type override: set[str]\n"
70#define BPY_PROPDEF_SUBTYPE_STRING_DOC \
71 " :arg subtype: Enumerator in :ref:`rna_enum_property_subtype_string_items`.\n" \
72 " :type subtype: str\n"
74#define BPY_PROPDEF_SUBTYPE_NUMBER_DOC \
75 " :arg subtype: Enumerator in :ref:`rna_enum_property_subtype_number_items`.\n" \
76 " :type subtype: str\n"
78#define BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC \
79 " :arg subtype: Enumerator in :ref:`rna_enum_property_subtype_number_array_items`.\n" \
80 " :type subtype: str\n"
157#define BPY_PROP_STORE_PY_DATA_SIZE (sizeof(BPyPropStore::py_data) / sizeof(PyObject *))
159#define ASSIGN_PYOBJECT_INCREF(a, b) \
161 BLI_assert((a) == nullptr); \
176 if (prop_store ==
nullptr) {
190 if (prop_store ==
nullptr) {
194 PyObject **py_data = (PyObject **)&prop_store->
py_data;
196 Py_XDECREF(py_data[
i]);
213 PyObject_GC_UnTrack(
self);
215 PyObject_GC_Del(
self);
232 return PyUnicode_FromFormat(
"<%.200s, %R, %R>", Py_TYPE(
self)->tp_name,
self->fn,
self->kw);
257 PyObject *
ret =
static_cast<PyObject *
>(
self->fn);
276 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
281 bpy_prop_deferred_doc,
282 "Intermediate storage for properties before registration.\n"
286 " This is not part of the stable API and may change between releases.");
289 PyVarObject_HEAD_INIT(
nullptr, 0)
308 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
309 bpy_prop_deferred_doc,
352 PyObject_GC_Track(
self);
353 return (PyObject *)
self;
377 PyObject *
self =
nullptr;
385 self =
static_cast<PyObject *
>(*instance);
392 if (
self ==
nullptr) {
428 const PyGILState_STATE gilstate = PyGILState_Ensure();
441 PyGILState_Release(prop_state.
gilstate);
464 if (PyLong_CheckExact(o)) {
466 if ((
size = PyLong_AsLong(o)) == -1) {
468 PyExc_ValueError,
"expected number or sequence of numbers, got %s", Py_TYPE(o)->tp_name);
483 if (!(seq_fast = PySequence_Fast(o,
"size must be a number of a sequence of numbers"))) {
486 const int seq_len = PySequence_Fast_GET_SIZE(seq_fast);
496 PyObject **seq_items = PySequence_Fast_ITEMS(seq_fast);
498 for (
int i = 0;
i < seq_len;
i++) {
500 if ((
size = PyLong_AsLong(seq_items[
i])) == -1) {
502 PyErr_Format(PyExc_ValueError,
503 "expected number in sequence, got %s at index %d",
510 PyErr_Format(PyExc_TypeError,
529 size_t values_elem_size,
532 const PyTypeObject *type,
533 const char *error_str)
535 if (array_len_info->
dims_len == 0) {
537 values, values_elem_size, py_values, array_len_info->
len_total, type, error_str);
539 const int *dims = array_len_info->
dims;
540 const int dims_len = array_len_info->
dims_len;
541 return PyC_AsArray_Multi(values, values_elem_size, py_values, dims, dims_len, type, error_str);
548 ((array_len_info->
dims[0] >= 2) && (array_len_info->
dims[0] <= 4)) &&
549 ((array_len_info->
dims[1] >= 2) && (array_len_info->
dims[1] <= 4)));
563 const float *values_src,
567 const int dim0 = array_len_info->
dims[0], dim1 = array_len_info->
dims[1];
569 for (
int i = 0;
i < dim0;
i++) {
570 for (
int j = 0; j < dim1; j++) {
571 values_dst[(j * dim0) +
i] = values_src[(
i * dim1) + j];
579 const int dim0 = array_len_info->
dims[0], dim1 = array_len_info->
dims[1];
581 float values_orig[4 * 4];
582 memcpy(values_orig, values,
sizeof(
float) * (dim0 * dim1));
597 PyGILState_STATE gilstate;
614 args = PyTuple_New(2);
616 PyTuple_SET_ITEM(args, 0,
self);
621 ret = PyObject_CallObject(py_func, args);
625 if (
ret ==
nullptr) {
629 if (
ret != Py_None) {
630 PyErr_SetString(PyExc_ValueError,
"the return value must be None");
665 args = PyTuple_New(1);
667 PyTuple_SET_ITEM(args, 0,
self);
669 ret = PyObject_CallObject(py_func, args);
673 if (
ret ==
nullptr) {
680 if (value_i == -1 && PyErr_Occurred()) {
685 value = bool(value_i);
710 args = PyTuple_New(2);
712 PyTuple_SET_ITEM(args, 0,
self);
714 PyTuple_SET_ITEM(args, 1, PyBool_FromLong(value));
716 ret = PyObject_CallObject(py_func, args);
720 if (
ret ==
nullptr) {
724 if (
ret != Py_None) {
725 PyErr_SetString(PyExc_ValueError,
"the return value must be None");
745 bool is_values_set =
false;
755 args = PyTuple_New(1);
757 PyTuple_SET_ITEM(args, 0,
self);
759 ret = PyObject_CallObject(py_func, args);
763 if (
ret !=
nullptr) {
769 "BoolVectorProperty get callback") == -1)
774 is_values_set =
true;
779 if (is_values_set ==
false) {
781 for (
i = 0;
i <
len;
i++) {
809 args = PyTuple_New(2);
811 PyTuple_SET_ITEM(args, 0,
self);
820 PyTuple_SET_ITEM(args, 1, py_values);
822 ret = PyObject_CallObject(py_func, args);
826 if (
ret ==
nullptr) {
830 if (
ret != Py_None) {
831 PyErr_SetString(PyExc_ValueError,
"the return value must be None");
863 args = PyTuple_New(1);
865 PyTuple_SET_ITEM(args, 0,
self);
867 ret = PyObject_CallObject(py_func, args);
871 if (
ret ==
nullptr) {
876 value = PyC_Long_AsI32(
ret);
878 if (value == -1 && PyErr_Occurred()) {
905 args = PyTuple_New(2);
907 PyTuple_SET_ITEM(args, 0,
self);
909 PyTuple_SET_ITEM(args, 1, PyLong_FromLong(value));
911 ret = PyObject_CallObject(py_func, args);
915 if (
ret ==
nullptr) {
919 if (
ret != Py_None) {
920 PyErr_SetString(PyExc_ValueError,
"the return value must be None");
940 bool is_values_set =
false;
950 args = PyTuple_New(1);
952 PyTuple_SET_ITEM(args, 0,
self);
954 ret = PyObject_CallObject(py_func, args);
958 if (
ret !=
nullptr) {
964 "IntVectorProperty get callback") == -1)
969 is_values_set =
true;
974 if (is_values_set ==
false) {
976 for (
i = 0;
i <
len;
i++) {
1004 args = PyTuple_New(2);
1006 PyTuple_SET_ITEM(args, 0,
self);
1008 if (array_len_info.
dims_len == 0) {
1016 PyTuple_SET_ITEM(args, 1, py_values);
1018 ret = PyObject_CallObject(py_func, args);
1022 if (
ret ==
nullptr) {
1026 if (
ret != Py_None) {
1027 PyErr_SetString(PyExc_ValueError,
"the return value must be None");
1059 args = PyTuple_New(1);
1061 PyTuple_SET_ITEM(args, 0,
self);
1063 ret = PyObject_CallObject(py_func, args);
1067 if (
ret ==
nullptr) {
1072 value = PyFloat_AsDouble(
ret);
1074 if (value == -1.0f && PyErr_Occurred()) {
1101 args = PyTuple_New(2);
1103 PyTuple_SET_ITEM(args, 0,
self);
1105 PyTuple_SET_ITEM(args, 1, PyFloat_FromDouble(value));
1107 ret = PyObject_CallObject(py_func, args);
1111 if (
ret ==
nullptr) {
1115 if (
ret != Py_None) {
1116 PyErr_SetString(PyExc_ValueError,
"the return value must be None");
1136 bool is_values_set =
false;
1146 args = PyTuple_New(1);
1148 PyTuple_SET_ITEM(args, 0,
self);
1150 ret = PyObject_CallObject(py_func, args);
1154 if (
ret !=
nullptr) {
1160 "FloatVectorProperty get callback") == -1)
1169 is_values_set =
true;
1174 if (is_values_set ==
false) {
1176 for (
i = 0;
i <
len;
i++) {
1193 PyObject *py_values;
1204 args = PyTuple_New(2);
1206 PyTuple_SET_ITEM(args, 0,
self);
1208 if (array_len_info.
dims_len == 0) {
1216 PyTuple_SET_ITEM(args, 1, py_values);
1218 ret = PyObject_CallObject(py_func, args);
1222 if (
ret ==
nullptr) {
1226 if (
ret != Py_None) {
1227 PyErr_SetString(PyExc_ValueError,
"the return value must be None");
1257 args = PyTuple_New(1);
1259 PyTuple_SET_ITEM(args, 0,
self);
1261 ret = PyObject_CallObject(py_func, args);
1265 if (
ret ==
nullptr) {
1269 else if (!PyUnicode_Check(
ret)) {
1271 PyExc_TypeError,
"return value must be a string, not %.200s", Py_TYPE(
ret)->tp_name);
1278 const char *buffer = PyUnicode_AsUTF8AndSize(
ret, &
length);
1279 memcpy(value, buffer,
length + 1);
1302 args = PyTuple_New(1);
1304 PyTuple_SET_ITEM(args, 0,
self);
1306 ret = PyObject_CallObject(py_func, args);
1310 if (
ret ==
nullptr) {
1314 else if (!PyUnicode_Check(
ret)) {
1316 PyExc_TypeError,
"return value must be a string, not %.200s", Py_TYPE(
ret)->tp_name);
1322 Py_ssize_t length_ssize = 0;
1323 PyUnicode_AsUTF8AndSize(
ret, &length_ssize);
1349 args = PyTuple_New(2);
1351 PyTuple_SET_ITEM(args, 0,
self);
1353 py_value = PyUnicode_FromString(value);
1355 PyErr_SetString(PyExc_ValueError,
"the return value must be a string");
1359 PyTuple_SET_ITEM(args, 1, py_value);
1362 ret = PyObject_CallObject(py_func, args);
1366 if (
ret ==
nullptr) {
1370 if (
ret != Py_None) {
1371 PyErr_SetString(PyExc_ValueError,
"the return value must be None");
1387 const char *info =
nullptr;
1389 if (PyTuple_CheckExact(item)) {
1391 static const char *_keywords[] = {
1396 static _PyArg_Parser _parser = {
1404 if (!_PyArg_ParseTupleAndKeywordsFast(item,
nullptr, &_parser, &text, &info)) {
1410 text = PyUnicode_AsUTF8(item);
1413 PyErr_Format(PyExc_TypeError,
1414 "expected sequence of strings or tuple pairs of strings, not %.200s",
1415 Py_TYPE(item)->tp_name);
1422 visit_params.
text = text;
1423 visit_params.
info = info ? info :
"";
1424 visit_fn(visit_params);
1432 const char *edit_text,
1435 PyGILState_STATE gilstate;
1440 gilstate = PyGILState_Ensure();
1448 PyObject *py_edit_text;
1454 args = PyTuple_New(3);
1456 PyTuple_SET_ITEM(args, 0,
self);
1461 py_edit_text = PyUnicode_FromString(edit_text);
1462 PyTuple_SET_ITEM(args, 2, py_edit_text);
1464 ret = PyObject_CallObject(py_func, args);
1468 if (
ret ==
nullptr) {
1472 if (PyIter_Check(
ret)) {
1475 PyObject *(*iternext)(PyObject *);
1476 it = PyObject_GetIter(
ret);
1477 if (it ==
nullptr) {
1481 iternext = *Py_TYPE(it)->tp_iternext;
1483 PyObject *py_text = iternext(it);
1484 if (py_text ==
nullptr) {
1494 if (PyErr_Occurred()) {
1495 if (PyErr_ExceptionMatches(PyExc_StopIteration)) {
1506 PyObject *ret_fast = PySequence_Fast(
1508 "StringProperty(...): "
1509 "return value from search callback was not a sequence, iterator or generator");
1510 if (ret_fast ==
nullptr) {
1514 const Py_ssize_t ret_num = PySequence_Fast_GET_SIZE(ret_fast);
1515 PyObject **ret_fast_items = PySequence_Fast_ITEMS(ret_fast);
1516 for (Py_ssize_t
i = 0;
i < ret_num;
i++) {
1522 Py_DECREF(ret_fast);
1533 PyGILState_Release(gilstate);
1549 PyObject *py_candidate;
1561 args = PyTuple_New(2);
1562 PyTuple_SET_ITEM(args, 0, py_self);
1563 PyTuple_SET_ITEM(args, 1, py_candidate);
1565 ret = PyObject_CallObject(py_func, args);
1569 if (
ret ==
nullptr) {
1605 args = PyTuple_New(1);
1607 PyTuple_SET_ITEM(args, 0,
self);
1609 ret = PyObject_CallObject(py_func, args);
1613 if (
ret ==
nullptr) {
1618 value = PyC_Long_AsI32(
ret);
1620 if (value == -1 && PyErr_Occurred()) {
1647 args = PyTuple_New(2);
1649 PyTuple_SET_ITEM(args, 0,
self);
1651 PyTuple_SET_ITEM(args, 1, PyLong_FromLong(value));
1653 ret = PyObject_CallObject(py_func, args);
1657 if (
ret ==
nullptr) {
1661 if (
ret != Py_None) {
1662 PyErr_SetString(PyExc_ValueError,
"the return value must be None");
1675 if (PyLong_CheckExact(py_long)) {
1676 *r_int = int(PyLong_AS_LONG(py_long));
1683#ifdef USE_ENUM_COPY_STRINGS
1685static size_t strswapbufcpy(
char *buf,
const char **orig)
1687 const char *src = *orig;
1691 while ((*dst = *src)) {
1717 const bool is_enum_flag,
1718 PyObject *default_py,
1719 int *r_default_value)
1723 const Py_ssize_t seq_len = PySequence_Fast_GET_SIZE(seq_fast);
1724 PyObject **seq_fast_items = PySequence_Fast_ITEMS(seq_fast);
1726#ifdef USE_ENUM_COPY_STRINGS
1727 Py_ssize_t totbuf = 0;
1729 short default_used = 0;
1730 const char *default_str_cmp =
nullptr;
1731 int default_int_cmp = 0;
1735 PyErr_SetString(PyExc_TypeError,
1736 "EnumProperty(...): maximum " STRINGIFY(
1740 if (default_py && !PySet_Check(default_py)) {
1741 PyErr_Format(PyExc_TypeError,
1742 "EnumProperty(...): default option must be a 'set' "
1743 "type when ENUM_FLAG is enabled, not a '%.200s'",
1744 Py_TYPE(default_py)->tp_name);
1751 default_str_cmp = PyUnicode_AsUTF8(default_py);
1752 if (default_str_cmp ==
nullptr) {
1753 PyErr_Format(PyExc_TypeError,
1754 "EnumProperty(...): default option must be a 'str' or 'int' "
1755 "type when ENUM_FLAG is disabled, not a '%.200s'",
1756 Py_TYPE(default_py)->tp_name);
1764 *r_default_value = 0;
1768 for (
i = 0;
i < seq_len;
i++) {
1770 const char *tmp_icon =
nullptr;
1771 Py_ssize_t item_size;
1772 Py_ssize_t id_str_len;
1773 Py_ssize_t name_str_len;
1774 Py_ssize_t desc_str_len;
1776 item = seq_fast_items[
i];
1778 if (PyTuple_CheckExact(item) && (item_size = PyTuple_GET_SIZE(item)) &&
1779 (item_size >= 3 && item_size <= 5) &&
1780 (tmp.
identifier = PyUnicode_AsUTF8AndSize(PyTuple_GET_ITEM(item, 0), &id_str_len)) &&
1781 (tmp.
name = PyUnicode_AsUTF8AndSize(PyTuple_GET_ITEM(item, 1), &name_str_len)) &&
1782 (tmp.
description = PyUnicode_AsUTF8AndSize(PyTuple_GET_ITEM(item, 2), &desc_str_len)) &&
1786 (tmp_icon = PyUnicode_AsUTF8(PyTuple_GET_ITEM(item, 3)))) &&
1790 if (item_size < 4) {
1794 if (default_py && PySet_Contains(default_py, PyTuple_GET_ITEM(item, 0))) {
1795 *r_default_value |= tmp.
value;
1800 if (item_size < 4) {
1804 if (default_py && default_used == 0) {
1805 if ((default_str_cmp !=
nullptr &&
STREQ(default_str_cmp, tmp.
identifier)) ||
1806 (default_str_cmp ==
nullptr && default_int_cmp == tmp.
value))
1808 *r_default_value = tmp.
value;
1820#ifdef USE_ENUM_COPY_STRINGS
1822 totbuf += id_str_len + name_str_len + desc_str_len + 3;
1825 else if (item == Py_None) {
1831 PyErr_SetString(PyExc_TypeError,
1832 "EnumProperty(...): expected a tuple containing "
1833 "(identifier, name, description) and optionally an "
1834 "icon name and unique number");
1841 if (default_py && default_used != PySet_GET_SIZE(default_py)) {
1844 PyErr_Format(PyExc_TypeError,
1845 "EnumProperty(..., default={...}): set has %d unused member(s)",
1846 PySet_GET_SIZE(default_py) - default_used);
1851 if (default_py && default_used == 0) {
1854 if (default_str_cmp) {
1855 PyErr_Format(PyExc_TypeError,
1856 "EnumProperty(..., default=\'%s\'): not found in enum members",
1860 PyErr_Format(PyExc_TypeError,
1861 "EnumProperty(..., default=%d): not found in enum members",
1868#ifdef USE_ENUM_COPY_STRINGS
1873 (
sizeof(
char) * totbuf),
1874 "enum_items_from_py2");
1876 char *buf = ((
char *)items_dup) + (
sizeof(
EnumPropertyItem) * (seq_len + 1));
1878 for (
i = 0;
i < seq_len;
i++, items_ptr++) {
1879 buf += strswapbufcpy(buf, &items_ptr->
identifier);
1880 buf += strswapbufcpy(buf, &items_ptr->
name);
1881 buf += strswapbufcpy(buf, &items_ptr->
description);
1897 PyGILState_STATE gilstate;
1902 gilstate = PyGILState_Ensure();
1907 PyObject *
self =
nullptr;
1914 args = PyTuple_New(2);
1916 PyTuple_SET_ITEM(args, 0,
self);
1924 PyTuple_SET_ITEM(args, 1, Py_None);
1928 items = PyObject_CallObject(py_func, args);
1932 if (items ==
nullptr) {
1936 PyObject *items_fast;
1937 int default_value_dummy = 0;
1939 if (!(items_fast = PySequence_Fast(items,
1940 "EnumProperty(...): "
1941 "return value from the callback was not a sequence")))
1949 &default_value_dummy);
1951 Py_DECREF(items_fast);
1974 PyGILState_Release(gilstate);
1982 if (py_func && py_func != Py_None) {
1983 if (!PyFunction_Check(py_func)) {
1984 PyErr_Format(PyExc_TypeError,
1985 "%s keyword: expected a function type, not a %.200s",
1987 Py_TYPE(py_func)->tp_name);
1991 PyCodeObject *f_code = (PyCodeObject *)PyFunction_GET_CODE(py_func);
1992 if (f_code->co_argcount != argcount) {
1993 PyErr_Format(PyExc_TypeError,
1994 "%s keyword: expected a function taking %d arguments, not %d",
1997 f_code->co_argcount);
2014 if (update_fn && update_fn != Py_None) {
2024 if (poll_fn && poll_fn != Py_None) {
2037 if (get_fn && get_fn != Py_None) {
2044 if (set_fn && set_fn != Py_None) {
2061 if (get_fn && get_fn != Py_None) {
2068 if (set_fn && set_fn != Py_None) {
2083 if (get_fn && get_fn != Py_None) {
2090 if (set_fn && set_fn != Py_None) {
2107 if (get_fn && get_fn != Py_None) {
2114 if (set_fn && set_fn != Py_None) {
2129 if (get_fn && get_fn != Py_None) {
2136 if (set_fn && set_fn != Py_None) {
2153 if (get_fn && get_fn != Py_None) {
2160 if (set_fn && set_fn != Py_None) {
2173 PyObject *search_fn,
2181 if (get_fn && get_fn != Py_None) {
2189 if (set_fn && set_fn != Py_None) {
2203 if (rna_search_fn) {
2217 if (get_fn && get_fn != Py_None) {
2224 if (set_fn && set_fn != Py_None) {
2231 if (itemf_fn && itemf_fn != Py_None) {
2262 PyObject *method_object,
2263 PyObject **r_deferred_result)
2266 BLI_assert(PyCFunction_CheckExact(method_object));
2268 const int args_len = PyTuple_GET_SIZE(args);
2269 PyMethodDef *method_def = ((PyCFunctionObject *)method_object)->m_ml;
2272 if (args_len == 1) {
2273 self = PyTuple_GET_ITEM(args, 0);
2274 args = PyTuple_New(0);
2277 PyCFunctionWithKeywords method_fn = (PyCFunctionWithKeywords)(
void *)method_def->ml_meth;
2278 *r_deferred_result = method_fn(
self, args, kw);
2284 const char *error_prefix = method_def->ml_name;
2286 PyErr_Format(PyExc_ValueError,
"%s: all args must be keywords", error_prefix);
2287 *r_deferred_result =
nullptr;
2293 if (srna ==
nullptr) {
2294 *r_deferred_result = PyErr_Occurred() ?
2303 *r_deferred_result = (PyObject *)intptr_t(1);
2330 if (!PyUnicode_Check(o)) {
2331 PyErr_Format(PyExc_TypeError,
"expected a string (got %.200s)", Py_TYPE(o)->tp_name);
2338 id = PyUnicode_AsUTF8AndSize(o, &id_len);
2340 PyErr_Format(PyExc_TypeError,
"'%.200s' too long, max length is %d",
id,
MAX_IDPROP_NAME - 1);
2348 PyErr_Format(PyExc_TypeError,
2349 "'%s' is defined as a non-dynamic type for '%s'",
2354 parse_data->
value = id;
2374 if (parse_data->
base.
items ==
nullptr) {
2375 PyErr_Format(PyExc_TypeError,
2376 "property-tags not available for '%s'",
2389#define BPY_PROPDEF_NAME_DOC \
2390 " :arg name: Name used in the user interface.\n" \
2391 " :type name: str\n"
2393#define BPY_PROPDEF_DESC_DOC \
2394 " :arg description: Text used for the tooltip and api documentation.\n" \
2395 " :type description: str\n"
2397#define BPY_PROPDEF_CTXT_DOC \
2398 " :arg translation_context: Text used as context to disambiguate translations.\n" \
2399 " :type translation_context: str\n"
2401#define BPY_PROPDEF_UNIT_DOC \
2402 " :arg unit: Enumerator in :ref:`rna_enum_property_unit_items`.\n" \
2403 " :type unit: str\n"
2405#define BPY_PROPDEF_NUM_MIN_DOC_(ty) \
2406 " :arg min: Hard minimum, trying to assign a value below will silently assign this minimum " \
2408 " :type min: " ty "\n"
2410#define BPY_PROPDEF_NUM_MAX_DOC_(ty) \
2411 " :arg max: Hard maximum, trying to assign a value above will silently assign this maximum " \
2413 " :type max: " ty "\n"
2415#define BPY_PROPDEF_NUM_MINMAX_DOC(ty) BPY_PROPDEF_NUM_MIN_DOC_(ty) BPY_PROPDEF_NUM_MAX_DOC_(ty)
2417#define BPY_PROPDEF_NUM_SOFT_MIN_DOC_(ty) \
2418 " :arg soft_min: Soft minimum (>= *min*), " \
2419 "user won't be able to drag the widget below this value in the UI.\n" \
2420 " :type soft_min: " ty "\n"
2422#define BPY_PROPDEF_NUM_SOFT_MAX_DOC_(ty) \
2423 " :arg soft_max: Soft maximum (<= *max*), " \
2424 "user won't be able to drag the widget above this value in the UI.\n" \
2425 " :type soft_max: " ty "\n"
2427#define BPY_PROPDEF_NUM_SOFT_MINMAX_DOC(ty) \
2428 BPY_PROPDEF_NUM_SOFT_MIN_DOC_(ty) BPY_PROPDEF_NUM_SOFT_MAX_DOC_(ty)
2430#define BPY_PROPDEF_VECSIZE_DOC \
2431 " :arg size: Vector dimensions in [1, " STRINGIFY(PYRNA_STACK_ARRAY) "]. " \
2432"An int sequence can be used to define multi-dimension arrays.\n" \
2433" :type size: int | Sequence[int]\n"
2435#define BPY_PROPDEF_INT_STEP_DOC \
2436 " :arg step: Step of increment/decrement in UI, in [1, 100], defaults to 1 (WARNING: unused " \
2438 " :type step: int\n"
2440#define BPY_PROPDEF_FLOAT_STEP_DOC \
2441 " :arg step: Step of increment/decrement in UI, in [1, 100], defaults to 3 (WARNING: actual " \
2442 "value is /100).\n" \
2443 " :type step: int\n"
2445#define BPY_PROPDEF_FLOAT_PREC_DOC \
2446 " :arg precision: Maximum number of decimal digits to display, in [0, 6]. Fraction is " \
2447 "automatically hidden for exact integer values of fields with unit 'NONE' or 'TIME' (frame " \
2448 "count) and step divisible by 100.\n" \
2449 " :type precision: int\n"
2451#define BPY_PROPDEF_UPDATE_DOC \
2452 " :arg update: Function to be called when this value is modified,\n" \
2453 " This function must take 2 values (self, context) and return None.\n" \
2454 " *Warning* there are no safety checks to avoid infinite recursion.\n" \
2455 " :type update: Callable[[:class:`bpy.types.bpy_struct`, :class:`bpy.types.Context`], " \
2458#define BPY_PROPDEF_POLL_DOC \
2459 " :arg poll: Function that determines whether an item is valid for this property.\n" \
2460 " The function must take 2 values (self, object) and return a boolean.\n" \
2462 " .. note:: The return value will be checked only when assigning an item from the UI, " \
2463 "but it is still possible to assign an \"invalid\" item to the property directly.\n" \
2465 " :type poll: Callable[[:class:`bpy.types.bpy_struct`, :class:`bpy.types.ID`], " \
2468#define BPY_PROPDEF_GET_DOC(ty) \
2469 " :arg get: Function to be called when this value is 'read',\n" \
2470 " This function must take 1 value (self) and return the value of the property.\n" \
2471 " :type get: Callable[[:class:`bpy.types.bpy_struct`], " ty "]\n"
2473#define BPY_PROPDEF_SET_DOC(ty) \
2474 " :arg set: Function to be called when this value is 'written',\n" \
2475 " This function must take 2 values (self, value) and return None.\n" \
2476 " :type set: Callable[[:class:`bpy.types.bpy_struct`, " ty "], None]\n"
2478#define BPY_PROPDEF_SEARCH_DOC \
2479 " :arg search: Function to be called to show candidates for this string (shown in the UI).\n" \
2480 " This function must take 3 values (self, context, edit_text)\n" \
2481 " and return a sequence, iterator or generator where each item must be:\n" \
2483 " - A single string (representing a candidate to display).\n" \
2484 " - A tuple-pair of strings, where the first is a candidate and the second\n" \
2485 " is additional information about the candidate.\n" \
2486 " :type search: Callable[[:class:`bpy.types.bpy_struct`, :class:`bpy.types.Context`, str], " \
2487 "Iterable[str | tuple[str, str]]" \
2489 " :arg search_options: Set of strings in:\n" \
2491 " - 'SORT' sorts the resulting items.\n" \
2492 " - 'SUGGESTION' lets the user enter values not found in search candidates.\n" \
2493 " **WARNING** disabling this flag causes the search callback to run on redraw,\n" \
2494 " so only disable this flag if it's not likely to cause performance issues.\n" \
2496 " :type search_options: set[str]\n"
2498#define BPY_PROPDEF_POINTER_TYPE_DOC \
2499 " :arg type: A subclass of a property group or ID types.\n" \
2500 " :type type: type[:class:`bpy.types.PropertyGroup` | :class:`bpy.types.ID`]\n"
2502#define BPY_PROPDEF_COLLECTION_TYPE_DOC \
2503 " :arg type: A subclass of a property group.\n" \
2504 " :type type: type[:class:`bpy.types.PropertyGroup`]\n"
2506#define BPY_PROPDEF_TAGS_DOC \
2507 " :arg tags: Enumerator of tags that are defined by parent class.\n" \
2508 " :type tags: set[str]\n"
2511static int bpy_struct_id_used(
StructRNA *srna,
char *identifier)
2533 BPy_BoolProperty_doc,
2534 ".. function:: BoolProperty("
2537 "description=\"\", "
2538 "translation_context=\"*\", "
2540 "options={'ANIMATABLE'}, "
2548 " Returns a new boolean property definition.\n"
2556 PyObject *deferred_result;
2558 if (srna ==
nullptr) {
2559 return deferred_result;
2564 id_data.
srna = srna;
2566 const char *name =
nullptr, *description =
"";
2567 const char *translation_context =
nullptr;
2568 bool default_value =
false;
2572 options_enum.
value = 0;
2576 override_enum.
value = 0;
2579 tags_enum.
srna = srna;
2585 PyObject *update_fn =
nullptr;
2586 PyObject *get_fn =
nullptr;
2587 PyObject *set_fn =
nullptr;
2589 static const char *_keywords[] = {
2593 "translation_context",
2604 static _PyArg_Parser _parser = {
2623 if (!_PyArg_ParseTupleAndKeywordsFast(args,
2630 &translation_context,
2665 if (translation_context) {
2672 if (options_enum.
is_set) {
2675 if (override_enum.
is_set) {
2687 BPy_BoolVectorProperty_doc,
2688 ".. function:: BoolVectorProperty("
2691 "description=\"\", "
2692 "translation_context=\"*\", "
2693 "default=(False, False, False), "
2694 "options={'ANIMATABLE'}, "
2703 " Returns a new vector boolean property definition.\n"
2705 " :arg default: sequence of booleans the length of *size*.\n"
2714 PyObject *deferred_result;
2717 if (srna ==
nullptr) {
2718 return deferred_result;
2723 id_data.
srna = srna;
2725 const char *name =
nullptr, *description =
"";
2726 const char *translation_context =
nullptr;
2731 PyObject *default_py =
nullptr;
2735 options_enum.
value = 0;
2739 override_enum.
value = 0;
2742 tags_enum.
srna = srna;
2748 PyObject *update_fn =
nullptr;
2749 PyObject *get_fn =
nullptr;
2750 PyObject *set_fn =
nullptr;
2752 static const char *_keywords[] = {
2756 "translation_context",
2768 static _PyArg_Parser _parser = {
2784 ":BoolVectorProperty",
2788 if (!_PyArg_ParseTupleAndKeywordsFast(args,
2795 &translation_context,
2814 if (default_py !=
nullptr) {
2817 sizeof(*default_value.
data()),
2821 "BoolVectorProperty(default=sequence)") == -1)
2842 if (array_len_info.
dims_len == 0) {
2844 if (default_py !=
nullptr) {
2850 if (default_py !=
nullptr) {
2856 if (translation_context) {
2863 if (options_enum.
is_set) {
2866 if (override_enum.
is_set) {
2878 BPy_IntProperty_doc,
2879 ".. function:: IntProperty("
2882 "description=\"\", "
2883 "translation_context=\"*\", "
2885 "min=-2**31, max=2**31-1, "
2886 "soft_min=-2**31, soft_max=2**31-1, "
2888 "options={'ANIMATABLE'}, "
2896 " Returns a new int property definition.\n"
2906 PyObject *deferred_result;
2908 if (srna ==
nullptr) {
2909 return deferred_result;
2914 id_data.
srna = srna;
2916 const char *name =
nullptr, *description =
"";
2917 const char *translation_context =
nullptr;
2918 int min = INT_MIN,
max = INT_MAX, soft_min = INT_MIN, soft_max = INT_MAX;
2920 int default_value = 0;
2925 options_enum.
value = 0;
2929 override_enum.
value = 0;
2932 tags_enum.
srna = srna;
2938 PyObject *update_fn =
nullptr;
2939 PyObject *get_fn =
nullptr;
2940 PyObject *set_fn =
nullptr;
2942 static const char *_keywords[] = {
2946 "translation_context",
2962 static _PyArg_Parser _parser = {
2986 if (!_PyArg_ParseTupleAndKeywordsFast(args,
2993 &translation_context,
3032 if (translation_context) {
3041 if (options_enum.
is_set) {
3044 if (override_enum.
is_set) {
3056 BPy_IntVectorProperty_doc,
3057 ".. function:: IntVectorProperty("
3060 "description=\"\", "
3061 "translation_context=\"*\", "
3062 "default=(0, 0, 0), min=-2**31, max=2**31-1, "
3064 "soft_max=2**31-1, "
3066 "options={'ANIMATABLE'}, "
3075 " Returns a new vector int property definition.\n"
3077 " :arg default: sequence of ints the length of *size*.\n"
3088 PyObject *deferred_result;
3091 if (srna ==
nullptr) {
3092 return deferred_result;
3097 id_data.
srna = srna;
3099 const char *name =
nullptr, *description =
"";
3100 const char *translation_context =
nullptr;
3101 int min = INT_MIN,
max = INT_MAX, soft_min = INT_MIN, soft_max = INT_MAX;
3107 PyObject *default_py =
nullptr;
3111 options_enum.
value = 0;
3115 override_enum.
value = 0;
3118 tags_enum.
srna = srna;
3124 PyObject *update_fn =
nullptr;
3125 PyObject *get_fn =
nullptr;
3126 PyObject *set_fn =
nullptr;
3128 static const char *_keywords[] = {
3129 "attr",
"name",
"description",
"translation_context",
3130 "default",
"min",
"max",
"soft_min",
3131 "soft_max",
"step",
"options",
"override",
3132 "tags",
"subtype",
"size",
"update",
3133 "get",
"set",
nullptr,
3135 static _PyArg_Parser _parser = {
3156 ":IntVectorProperty",
3160 if (!_PyArg_ParseTupleAndKeywordsFast(args,
3167 &translation_context,
3191 if (default_py !=
nullptr) {
3194 sizeof(*default_value.
data()),
3198 "IntVectorProperty(default=sequence)") == -1)
3219 if (array_len_info.
dims_len == 0) {
3221 if (default_py !=
nullptr) {
3227 if (default_py !=
nullptr) {
3234 if (translation_context) {
3242 if (options_enum.
is_set) {
3245 if (override_enum.
is_set) {
3257 BPy_FloatProperty_doc,
3258 ".. function:: FloatProperty("
3261 "description=\"\", "
3262 "translation_context=\"*\", "
3264 "min=-3.402823e+38, max=3.402823e+38, "
3265 "soft_min=-3.402823e+38, soft_max=3.402823e+38, "
3268 "options={'ANIMATABLE'}, "
3277 " Returns a new float (single precision) property definition.\n"
3288 PyObject *deferred_result;
3290 if (srna ==
nullptr) {
3291 return deferred_result;
3296 id_data.
srna = srna;
3298 const char *name =
nullptr, *description =
"";
3299 const char *translation_context =
nullptr;
3302 float default_value = 0.0f;
3308 options_enum.
value = 0;
3312 override_enum.
value = 0;
3315 tags_enum.
srna = srna;
3325 PyObject *update_fn =
nullptr;
3326 PyObject *get_fn =
nullptr;
3327 PyObject *set_fn =
nullptr;
3329 static const char *_keywords[] = {
3330 "attr",
"name",
"description",
"translation_context",
3331 "default",
"min",
"max",
"soft_min",
3332 "soft_max",
"step",
"precision",
"options",
3333 "override",
"tags",
"subtype",
"unit",
3334 "update",
"get",
"set",
nullptr,
3336 static _PyArg_Parser _parser = {
3362 if (!_PyArg_ParseTupleAndKeywordsFast(args,
3369 &translation_context,
3412 if (translation_context) {
3416 prop, std::max(soft_min,
min), std::min(soft_max,
max),
step, precision);
3421 if (options_enum.
is_set) {
3424 if (override_enum.
is_set) {
3436 BPy_FloatVectorProperty_doc,
3437 ".. function:: FloatVectorProperty("
3440 "description=\"\", "
3441 "translation_context=\"*\", "
3442 "default=(0.0, 0.0, 0.0), "
3443 "min=sys.float_info.min, max=sys.float_info.max, "
3444 "soft_min=sys.float_info.min, soft_max=sys.float_info.max, "
3447 "options={'ANIMATABLE'}, "
3457 " Returns a new vector float property definition.\n"
3459 " :arg default: Sequence of floats the length of *size*.\n"
3471 PyObject *deferred_result;
3474 if (srna ==
nullptr) {
3475 return deferred_result;
3480 id_data.
srna = srna;
3482 const char *name =
nullptr, *description =
"";
3483 const char *translation_context =
nullptr;
3491 PyObject *default_py =
nullptr;
3495 options_enum.
value = 0;
3499 override_enum.
value = 0;
3502 tags_enum.
srna = srna;
3512 PyObject *update_fn =
nullptr;
3513 PyObject *get_fn =
nullptr;
3514 PyObject *set_fn =
nullptr;
3516 static const char *_keywords[] = {
3517 "attr",
"name",
"description",
"translation_context",
3518 "default",
"min",
"max",
"soft_min",
3519 "soft_max",
"step",
"precision",
"options",
3520 "override",
"tags",
"subtype",
"unit",
3521 "size",
"update",
"get",
"set",
3524 static _PyArg_Parser _parser = {
3547 ":FloatVectorProperty",
3551 if (!_PyArg_ParseTupleAndKeywordsFast(args,
3558 &translation_context,
3585 if (default_py !=
nullptr) {
3588 sizeof(*default_value.
data()),
3592 "FloatVectorProperty(default=sequence)") == -1)
3616 if (array_len_info.
dims_len == 0) {
3618 if (default_py !=
nullptr) {
3624 if (default_py !=
nullptr) {
3631 if (translation_context) {
3635 prop, std::max(soft_min,
min), std::min(soft_max,
max),
step, precision);
3640 if (options_enum.
is_set) {
3643 if (override_enum.
is_set) {
3655 BPy_StringProperty_doc,
3656 ".. function:: StringProperty("
3659 "description=\"\", "
3660 "translation_context=\"*\", "
3663 "options={'ANIMATABLE'}, "
3671 "search_options={'SUGGESTION'})\n"
3673 " Returns a new string property definition.\n"
3675 " :arg default: initializer string.\n"
3676 " :type default: str\n"
3677 " :arg maxlen: maximum length of the string.\n"
3685 PyObject *deferred_result;
3687 if (srna ==
nullptr) {
3688 return deferred_result;
3693 id_data.
srna = srna;
3695 const char *name =
nullptr, *description =
"";
3696 const char *translation_context =
nullptr, *default_value =
"";
3702 options_enum.
value = 0;
3706 override_enum.
value = 0;
3709 tags_enum.
srna = srna;
3715 PyObject *update_fn =
nullptr;
3716 PyObject *get_fn =
nullptr;
3717 PyObject *set_fn =
nullptr;
3718 PyObject *search_fn =
nullptr;
3723 static const char *_keywords[] = {
3727 "translation_context",
3741 static _PyArg_Parser _parser = {
3763 if (!_PyArg_ParseTupleAndKeywordsFast(args,
3770 &translation_context,
3786 &search_options_enum))
3813 if (default_value && default_value[0]) {
3817 if (translation_context) {
3824 if (options_enum.
is_set) {
3827 if (override_enum.
is_set) {
3840 BPy_EnumProperty_doc,
3841 ".. function:: EnumProperty("
3845 "description=\"\", "
3846 "translation_context=\"*\", "
3848 "options={'ANIMATABLE'}, "
3855 " Returns a new enumerator property definition.\n"
3857 " :arg items: sequence of enum items formatted:\n"
3858 " ``[(identifier, name, description, icon, number), ...]``.\n"
3860 " The first three elements of the tuples are mandatory.\n"
3862 " :identifier: The identifier is used for Python access.\n"
3863 " An empty identifier means that the item is a separator\n"
3864 " :name: Name for the interface.\n"
3865 " :description: Used for documentation and tooltips.\n"
3866 " :icon: An icon string identifier or integer icon value\n"
3867 " (e.g. returned by :class:`bpy.types.UILayout.icon`)\n"
3868 " :number: Unique value used as the identifier for this item (stored in file data).\n"
3869 " Use when the identifier may need to change. If the *ENUM_FLAG* option is used,\n"
3870 " the values are bit-masks and should be powers of two.\n"
3872 " When an item only contains 4 items they define ``(identifier, name, description, "
3875 " Separators may be added using either None (nameless separator),\n"
3876 " or a regular item tuple with an empty identifier string, in which case the name,\n"
3877 " if non-empty, will be displayed in the UI above the separator line."
3879 " For dynamic values a callback can be passed which returns a list in\n"
3880 " the same format as the static list.\n"
3881 " This function must take 2 arguments ``(self, context)``, **context may be None**.\n"
3885 " There is a known bug with using a callback,\n"
3886 " Python must keep a reference to the strings returned by the callback or Blender\n"
3887 " will misbehave or even crash."
3889 " :type items: Iterable["
3890 "tuple[str, str, str] | "
3891 "tuple[str, str, str, int] | "
3892 "tuple[str, str, str, int, int] | "
3894 "Callable[[:class:`bpy.types.bpy_struct`, :class:`bpy.types.Context` | None], "
3897 "tuple[str, str, str] | "
3898 "tuple[str, str, str, int] | "
3899 "tuple[str, str, str, int, int] | "
3902 " :arg default: The default value for this enum, a string from the identifiers used in "
3903 "*items*, or integer matching an item number.\n"
3904 " If the *ENUM_FLAG* option is used this must be a set of such string identifiers "
3906 " WARNING: Strings cannot be specified for dynamic enums\n"
3907 " (i.e. if a callback function is given as *items* parameter).\n"
3915 PyObject *deferred_result;
3917 if (srna ==
nullptr) {
3918 return deferred_result;
3923 id_data.
srna = srna;
3925 const char *name =
nullptr, *description =
"";
3926 const char *translation_context =
nullptr;
3927 PyObject *default_py =
nullptr;
3928 int default_value = 0;
3929 PyObject *items, *items_fast;
3935 options_enum.
value = 0;
3939 override_enum.
value = 0;
3942 tags_enum.
srna = srna;
3944 bool is_itemf =
false;
3945 PyObject *update_fn =
nullptr;
3946 PyObject *get_fn =
nullptr;
3947 PyObject *set_fn =
nullptr;
3949 static const char *_keywords[] = {
3954 "translation_context",
3964 static _PyArg_Parser _parser = {
3983 if (!_PyArg_ParseTupleAndKeywordsFast(args,
3991 &translation_context,
4016 if (default_py == Py_None) {
4019 default_py =
nullptr;
4024 if (PyFunction_Check(items)) {
4025 PyCodeObject *f_code = (PyCodeObject *)PyFunction_GET_CODE(items);
4026 if (f_code->co_argcount != 2) {
4027 PyErr_Format(PyExc_ValueError,
4028 "EnumProperty(...): expected 'items' function to take 2 arguments, not %d",
4029 f_code->co_argcount);
4039 "EnumProperty(...): 'default' can only be an integer when 'items' is a function");
4048 if (!(items_fast = PySequence_Fast(
4050 "EnumProperty(...): "
4051 "expected a sequence of tuples for the enum items or a function")))
4060 Py_DECREF(items_fast);
4070 srna, id_data.
value, eitems, default_value, name ? name : id_data.
value, description);
4074 srna, id_data.
value, eitems, default_value, name ? name : id_data.
value, description);
4076 if (translation_context) {
4083 if (options_enum.
is_set) {
4086 if (override_enum.
is_set) {
4093 if (is_itemf ==
false) {
4096 Py_DECREF(items_fast);
4110 if (PyErr_Occurred()) {
4112 const char *msg_char = PyUnicode_AsUTF8(msg);
4116 PyExc_TypeError,
"%.200s expected an RNA type, failed with: %s", error_prefix, msg_char);
4120 PyErr_Format(PyExc_TypeError,
4121 "%.200s expected an RNA type, failed with type '%s'",
4123 Py_TYPE(value)->tp_name);
4133 BPy_PointerProperty_doc,
4134 ".. function:: PointerProperty("
4138 "description=\"\", "
4139 "translation_context=\"*\", "
4140 "options={'ANIMATABLE'}, "
4146 " Returns a new pointer property definition.\n"
4151 ".. note:: Pointer properties do not support storing references to embedded IDs "
4152 "(e.g. `bpy.types.Scene.collection`, `bpy.types.Material.node_tree`).\n"
4153 " These should exclusively be referenced and accessed through their owner ID "
4154 "(e.g. the scene or material).\n");
4159 PyObject *deferred_result;
4162 if (srna ==
nullptr) {
4163 return deferred_result;
4168 id_data.
srna = srna;
4170 const char *name =
nullptr, *description =
"";
4171 const char *translation_context =
nullptr;
4174 PyObject *type = Py_None;
4178 options_enum.
value = 0;
4182 override_enum.
value = 0;
4185 tags_enum.
srna = srna;
4187 PyObject *update_fn =
nullptr, *poll_fn =
nullptr;
4189 static const char *_keywords[] = {
4194 "translation_context",
4202 static _PyArg_Parser _parser = {
4219 if (!_PyArg_ParseTupleAndKeywordsFast(args,
4227 &translation_context,
4245 PyErr_Format(PyExc_TypeError,
4246 "PointerProperty(...) expected an RNA type derived from %.200s or %.200s",
4262 srna, id_data.
value, ptype, name ? name : id_data.
value, description);
4263 if (translation_context) {
4270 if (options_enum.
is_set) {
4273 if (override_enum.
is_set) {
4291 BPy_CollectionProperty_doc,
4292 ".. function:: CollectionProperty("
4296 "description=\"\", "
4297 "translation_context=\"*\", "
4298 "options={'ANIMATABLE'}, "
4302 " Returns a new collection property definition.\n"
4310 PyObject *deferred_result;
4313 if (srna ==
nullptr) {
4314 return deferred_result;
4319 id_data.
srna = srna;
4321 const char *name =
nullptr, *description =
"";
4322 const char *translation_context =
nullptr;
4325 PyObject *type = Py_None;
4329 options_enum.
value = 0;
4333 override_enum.
value = 0;
4336 tags_enum.
srna = srna;
4338 static const char *_keywords[] = {
4343 "translation_context",
4349 static _PyArg_Parser _parser = {
4360 ":CollectionProperty",
4364 if (!_PyArg_ParseTupleAndKeywordsFast(args,
4372 &translation_context,
4389 PyErr_Format(PyExc_TypeError,
4390 "CollectionProperty(...) expected an RNA type derived from %.200s",
4399 srna, id_data.
value, ptype, name ? name : id_data.
value, description);
4400 if (translation_context) {
4407 if (options_enum.
is_set) {
4410 if (override_enum.
is_set) {
4426 BPy_RemoveProperty_doc,
4427 ".. function:: RemoveProperty(cls, attr)\n"
4429 " Removes a dynamically defined property.\n"
4431 " :arg cls: The class containing the property (must be a positional argument).\n"
4432 " :type cls: type\n"
4433 " :arg attr: Property name (must be passed as a keyword).\n"
4434 " :type attr: str\n"
4436 ".. note:: Typically this function doesn't need to be accessed directly.\n"
4437 " Instead use ``del cls.attr``\n");
4442 if (PyTuple_GET_SIZE(args) == 1) {
4444 self = PyTuple_GET_ITEM(args, 0);
4445 args = PyTuple_New(0);
4450 if (PyTuple_GET_SIZE(args) > 1) {
4451 PyErr_SetString(PyExc_ValueError,
"expected one positional arg, one keyword arg");
4456 if (srna ==
nullptr && PyErr_Occurred()) {
4459 if (srna ==
nullptr) {
4460 PyErr_SetString(PyExc_TypeError,
"RemoveProperty(): struct rna not available for this type");
4464 const char *
id =
nullptr;
4466 static const char *_keywords[] = {
4470 static _PyArg_Parser _parser = {
4477 if (!_PyArg_ParseTupleAndKeywordsFast(args, kw, &_parser, &
id)) {
4482 PyErr_Format(PyExc_TypeError,
"RemoveProperty(): '%s' not a defined dynamic property",
id);
4497# pragma clang diagnostic push
4498# pragma clang diagnostic ignored "-Wcast-function-type"
4500# pragma GCC diagnostic push
4501# pragma GCC diagnostic ignored "-Wcast-function-type"
4508 METH_VARARGS | METH_KEYWORDS,
4509 BPy_BoolProperty_doc},
4510 {
"BoolVectorProperty",
4512 METH_VARARGS | METH_KEYWORDS,
4513 BPy_BoolVectorProperty_doc},
4516 METH_VARARGS | METH_KEYWORDS,
4517 BPy_IntProperty_doc},
4518 {
"IntVectorProperty",
4520 METH_VARARGS | METH_KEYWORDS,
4521 BPy_IntVectorProperty_doc},
4524 METH_VARARGS | METH_KEYWORDS,
4525 BPy_FloatProperty_doc},
4526 {
"FloatVectorProperty",
4528 METH_VARARGS | METH_KEYWORDS,
4529 BPy_FloatVectorProperty_doc},
4532 METH_VARARGS | METH_KEYWORDS,
4533 BPy_StringProperty_doc},
4536 METH_VARARGS | METH_KEYWORDS,
4537 BPy_EnumProperty_doc},
4540 METH_VARARGS | METH_KEYWORDS,
4541 BPy_PointerProperty_doc},
4542 {
"CollectionProperty",
4544 METH_VARARGS | METH_KEYWORDS,
4545 BPy_CollectionProperty_doc},
4549 METH_VARARGS | METH_KEYWORDS,
4550 BPy_RemoveProperty_doc},
4551 {
nullptr,
nullptr, 0,
nullptr},
4556# pragma clang diagnostic pop
4558# pragma GCC diagnostic pop
4565 PyObject **py_data = (PyObject **)&prop_store->py_data;
4567 Py_VISIT(py_data[
i]);
4576 PyObject **py_data = (PyObject **)&prop_store->py_data;
4578 Py_CLEAR(py_data[
i]);
4587 "This module defines properties to extend Blender's internal data. The result of these "
4589 " is used to assign properties to classes registered with Blender and can't be used "
4592 ".. note:: All parameters to these functions must be passed as keywords.\n");
4608 PyObject *submodule;
4609 PyObject *submodule_dict;
4612 PyDict_SetItemString(PyImport_GetModuleDict(),
props_module.m_name, submodule);
4615 submodule_dict = PyModule_GetDict(submodule);
4617#define ASSIGN_STATIC(_name) pymeth_##_name = PyDict_GetItemString(submodule_dict, #_name)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
ID and Library types, which are fundamental for SDNA.
Read Guarded memory(de)allocation.
int RNA_def_property_free_identifier(StructOrFunctionRNA *cont_, const char *identifier)
void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA *prop)
void RNA_def_property_free_pointers_set_py_data_callback(void(*py_data_clear_fn)(PropertyRNA *prop))
void RNA_def_property_free_identifier_deferred_finish(StructOrFunctionRNA *cont_, void *handle)
int RNA_def_property_free_identifier_deferred_prepare(StructOrFunctionRNA *cont_, const char *identifier, void **handle)
#define RNA_MAX_ARRAY_DIMENSION
int(*)(PointerRNA *ptr, PropertyRNA *prop) EnumPropertyGetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, const bool *values) BooleanArrayPropertySetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, char *value) StringPropertyGetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, bool *values) BooleanArrayPropertyGetFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop) StringPropertyLengthFunc
@ STRUCT_CONTAINS_DATABLOCK_IDPROPERTIES
void(*)(PointerRNA *ptr, PropertyRNA *prop, float *values) FloatArrayPropertyGetFunc
#define RNA_ENUM_BITFLAG_SIZE
void(*)(PointerRNA *ptr, PropertyRNA *prop, const char *value) StringPropertySetFunc
eStringPropertySearchFlag
@ PROP_STRING_SEARCH_SUGGESTION
void(*)(PointerRNA *ptr, PropertyRNA *prop, int *values) IntArrayPropertyGetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, int value) EnumPropertySetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, const int *values) IntArrayPropertySetFunc
bool(*)(PointerRNA *ptr, PropertyRNA *prop) BooleanPropertyGetFunc
void(*)(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *edit_text, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn) StringPropertySearchFunc
float(*)(PointerRNA *ptr, PropertyRNA *prop) FloatPropertyGetFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop) IntPropertyGetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, float value) FloatPropertySetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, int value) IntPropertySetFunc
const EnumPropertyItem *(*)(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) EnumPropertyItemFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, const float *values) FloatArrayPropertySetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, bool value) BooleanPropertySetFunc
void bpy_context_clear(struct bContext *C, const PyGILState_STATE *gilstate)
void bpy_context_set(struct bContext *C, PyGILState_STATE *gilstate)
#define BPY_PROPDEF_SUBTYPE_STRING_DOC
static void bpy_prop_string_visit_for_search_fn(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *edit_text, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
static PyObject * pymeth_FloatProperty
static void bpy_prop_callback_assign_float_array(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn)
static bool bpy_prop_string_visit_fn_call(PyObject *py_func, PyObject *item, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
static void bpy_prop_callback_assign_boolean_array(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn)
static void bpy_prop_boolean_array_set_fn(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
static PyObject * BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
#define ASSIGN_PYOBJECT_INCREF(a, b)
static void bpy_prop_array_matrix_swap_row_column_vn_vn(float *values_dst, const float *values_src, const BPyPropArrayLength *array_len_info)
static PyObject * BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw)
static void bpy_prop_callback_assign_string(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *search_fn, const eStringPropertySearchFlag search_flag)
static PyModuleDef props_module
static bool bpy_prop_pointer_poll_fn(PointerRNA *self, PointerRNA candidate, PropertyRNA *prop)
#define BPY_PROPDEF_OPTIONS_OVERRIDE_COLLECTION_DOC
static bool py_long_as_int(PyObject *py_long, int *r_int)
PyObject * BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw)
static bool bpy_prop_array_is_matrix_compatible_ex(int subtype, const BPyPropArrayLength *array_len_info)
static float bpy_prop_float_get_fn(PointerRNA *ptr, PropertyRNA *prop)
#define BPY_PROPDEF_NAME_DOC
static int bpy_prop_int_get_fn(PointerRNA *ptr, PropertyRNA *prop)
static PyGetSetDef bpy_prop_deferred_getset[]
static void bpy_prop_callback_assign_int_array(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn)
#define BPY_PROPDEF_FLOAT_STEP_DOC
static PyObject * pymeth_IntVectorProperty
PyDoc_STRVAR(bpy_prop_deferred_doc, "Intermediate storage for properties before registration.\n" "\n" ".. note::\n" "\n" " This is not part of the stable API and may change between releases.")
#define BPY_PROPDEF_UPDATE_DOC
static bool bpy_prop_array_is_matrix_compatible(PropertyRNA *prop, const BPyPropArrayLength *array_len_info)
static void bpy_prop_boolean_array_get_fn(PointerRNA *ptr, PropertyRNA *prop, bool *values)
static int bpy_prop_string_length_fn(PointerRNA *ptr, PropertyRNA *prop)
static PyObject * pymeth_EnumProperty
#define BPY_PROPDEF_NUM_SOFT_MINMAX_DOC(ty)
static PyObject * bpy_prop_deferred_keywords_get(BPy_PropDeferred *self, void *)
static int bpy_prop_deferred_clear(BPy_PropDeferred *self)
static void bpy_prop_py_data_remove(PropertyRNA *prop)
static void bpy_prop_int_array_get_fn(PointerRNA *ptr, PropertyRNA *prop, int *values)
#define BPY_PROPDEF_FLOAT_PREC_DOC
static void bpy_prop_float_array_set_fn(PointerRNA *ptr, PropertyRNA *prop, const float *values)
#define BPY_PROPDEF_POLL_DOC
#define BPY_PROPDEF_NUM_MINMAX_DOC(ty)
static PyObject * BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject *kw)
static PyObject * pymeth_FloatVectorProperty
static PyObject * BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw)
PyObject * BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw)
static void bpy_prop_int_set_fn(PointerRNA *ptr, PropertyRNA *prop, int value)
static PyObject * pymeth_IntProperty
#define BPY_PROPDEF_SET_DOC(ty)
static void bpy_prop_int_array_set_fn(PointerRNA *ptr, PropertyRNA *prop, const int *values)
#define BPY_PROPDEF_POINTER_TYPE_DOC
PyObject * BPY_rna_props()
static PyMethodDef props_methods[]
static void bpy_prop_callback_assign_pointer(PropertyRNA *prop, PyObject *poll_fn)
static PyObject * pyrna_struct_as_instance(PointerRNA *ptr)
static PyObject * BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw)
static PyObject * bpy_prop_deferred_function_get(BPy_PropDeferred *self, void *)
static void bpy_prop_deferred_dealloc(BPy_PropDeferred *self)
static int props_clear(PyObject *)
static void bpy_prop_boolean_set_fn(PointerRNA *ptr, PropertyRNA *prop, bool value)
void BPY_rna_props_clear_all()
static PyObject * pymeth_RemoveProperty
static void bpy_prop_callback_assign_int(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn)
static void bpy_prop_enum_set_fn(PointerRNA *ptr, PropertyRNA *prop, int value)
static int icon_id_from_name(const char *name)
static PyObject * pymeth_CollectionProperty
static void bpy_prop_assign_flag(PropertyRNA *prop, const int flag)
static const EnumPropertyItem * enum_items_from_py(PyObject *seq_fast, const bool is_enum_flag, PyObject *default_py, int *r_default_value)
static PyObject * BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObject *kw)
static void bpy_prop_callback_assign_float(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn)
static PyObject * BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw)
#define BPY_PROPDEF_CTXT_DOC
#define BPY_PROPDEF_COLLECTION_TYPE_DOC
#define BPY_PROPDEF_TAGS_DOC
static int bpy_prop_deferred_traverse(BPy_PropDeferred *self, visitproc visit, void *arg)
#define BPY_PROP_STORE_PY_DATA_SIZE
static int bpy_prop_array_length_parse(PyObject *o, void *p)
static void bpy_prop_float_array_get_fn(PointerRNA *ptr, PropertyRNA *prop, float *values)
static PyObject * pymeth_PointerProperty
#define BPY_PROPDEF_OPTIONS_DOC
static int bpy_prop_arg_parse_id(PyObject *o, void *p)
static int bpy_prop_array_from_py_with_dims(void *values, size_t values_elem_size, PyObject *py_values, const BPyPropArrayLength *array_len_info, const PyTypeObject *type, const char *error_str)
static void bpy_prop_gil_rna_writable_end(const BPyPropGIL_RNAWritable_State &prop_state)
static bool bpy_prop_boolean_get_fn(PointerRNA *ptr, PropertyRNA *prop)
#define BPY_PROPDEF_GET_DOC(ty)
static void bpy_prop_float_set_fn(PointerRNA *ptr, PropertyRNA *prop, float value)
static void bpy_prop_callback_assign_boolean(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn)
static BPyPropStore * bpy_prop_py_data_ensure(PropertyRNA *prop)
static StructRNA * bpy_prop_deferred_data_or_srna(PyObject *self, PyObject *args, PyObject *kw, PyObject *method_object, PyObject **r_deferred_result)
#define BPY_PROPDEF_SEARCH_DOC
static void bpy_prop_string_get_fn(PointerRNA *ptr, PropertyRNA *prop, char *value)
StructRNA * pointer_type_from_py(PyObject *value, const char *error_prefix)
static PyObject * bpy_prop_deferred_data_CreatePyObject(PyObject *fn, PyObject *kw)
static int bpy_prop_enum_get_fn(PointerRNA *ptr, PropertyRNA *prop)
static const EnumPropertyItem * bpy_prop_enum_itemf_fn(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
static PyObject * pymeth_BoolProperty
static void bpy_prop_array_matrix_swap_row_column_vn(float *values, const BPyPropArrayLength *array_len_info)
static BPyPropGIL_RNAWritable_State bpy_prop_gil_rna_writable_begin()
#define BPY_PROPDEF_OPTIONS_ENUM_DOC
static int bpy_prop_arg_parse_tag_defines(PyObject *o, void *p)
static void bpy_prop_update_fn(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
static void bpy_prop_callback_assign_update(PropertyRNA *prop, PyObject *update_fn)
#define BPY_PROPDEF_UNIT_DOC
static void bpy_prop_callback_assign_enum(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *itemf_fn)
#define BPY_PROPDEF_SUBTYPE_NUMBER_DOC
static PyObject * bpy_prop_deferred_call(BPy_PropDeferred *, PyObject *, PyObject *)
static int bpy_prop_callback_check(PyObject *py_func, const char *keyword, int argcount)
static PyObject * BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw)
#define ASSIGN_STATIC(_name)
#define BPY_PROPDEF_SUBTYPE_NUMBER_ARRAY_DOC
#define BPY_PROPDEF_VECSIZE_DOC
#define BPY_PROPDEF_INT_STEP_DOC
#define BPY_PROPDEF_DESC_DOC
PyTypeObject bpy_prop_deferred_Type
static PyObject * pymeth_BoolVectorProperty
static PyObject * BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject *kw)
static void bpy_prop_string_set_fn(PointerRNA *ptr, PropertyRNA *prop, const char *value)
static ListBase g_bpy_prop_store_list
static void bpy_prop_assign_flag_override(PropertyRNA *prop, const int flag_override)
#define BPY_PROPDEF_OPTIONS_OVERRIDE_DOC
static int props_visit(PyObject *, visitproc visit, void *arg)
static PyObject * bpy_prop_deferred_repr(BPy_PropDeferred *self)
static PyObject * pymeth_StringProperty
#define PYRNA_STACK_ARRAY
StructRNA * srna_from_self(PyObject *self, const char *error_prefix)
void pyrna_write_set(bool val)
PyObject * pyrna_struct_CreatePyObject(PointerRNA *ptr)
BPy_StructRNA * bpy_context_module
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void reinitialize(const int64_t new_size)
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
float length(VecOp< float, D >) RET
static bool py_long_as_int(PyObject *py_long, int *r_int)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
int pyrna_enum_bitfield_parse_set(PyObject *o, void *p)
int pyrna_enum_value_parse_string(PyObject *o, void *p)
PyObject * PyC_Tuple_PackArray_Bool(const bool *array, uint len)
PyObject * PyC_Tuple_PackArray_Multi_Bool(const bool *array, const int dims[], const int dims_len)
PyObject * PyC_Tuple_PackArray_I32(const int *array, uint len)
PyObject * PyC_ExceptionBuffer()
int PyC_Long_AsBool(PyObject *value)
int PyC_AsArray(void *array, const size_t array_item_size, PyObject *value, const Py_ssize_t length, const PyTypeObject *type, const char *error_prefix)
PyObject * PyC_Tuple_PackArray_Multi_F32(const float *array, const int dims[], const int dims_len)
int PyC_AsArray_Multi(void *array, const size_t array_item_size, PyObject *value, const int *dims, const int dims_len, const PyTypeObject *type, const char *error_prefix)
void PyC_Err_PrintWithFunc(PyObject *py_func)
PyObject * PyC_Tuple_PackArray_F32(const float *array, uint len)
PyObject * PyC_Tuple_PackArray_Multi_I32(const int *array, const int dims[], const int dims_len)
int PyC_ParseBool(PyObject *o, void *p)
header-only compatibility defines.
#define PY_ARG_PARSER_HEAD_COMPAT()
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
bool RNA_struct_is_ID(const StructRNA *type)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
const EnumPropertyItem * RNA_struct_property_tag_defines(const StructRNA *type)
int RNA_property_enum_get_default(PointerRNA *ptr, PropertyRNA *prop)
PropertyType RNA_property_type(PropertyRNA *prop)
void ** RNA_struct_instance(PointerRNA *ptr)
const char * RNA_struct_identifier(const StructRNA *type)
bool RNA_struct_idprops_contains_datablock(const StructRNA *type)
int RNA_property_array_dimension(const PointerRNA *ptr, PropertyRNA *prop, int length[])
void * RNA_property_py_data_get(PropertyRNA *prop)
int RNA_property_flag(PropertyRNA *prop)
const char * RNA_struct_ui_name(const StructRNA *type)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void RNA_def_property_string_search_func_runtime(PropertyRNA *prop, StringPropertySearchFunc search_fn, const eStringPropertySearchFlag search_flag)
void RNA_def_struct_flag(StructRNA *srna, int flag)
PropertyRNA * RNA_def_pointer_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_int_funcs_runtime(PropertyRNA *prop, IntPropertyGetFunc getfunc, IntPropertySetFunc setfunc, IntPropertyRangeFunc rangefunc)
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
void RNA_def_property_enum_funcs_runtime(PropertyRNA *prop, EnumPropertyGetFunc getfunc, EnumPropertySetFunc setfunc, EnumPropertyItemFunc itemfunc)
void RNA_def_property_boolean_array_funcs_runtime(PropertyRNA *prop, BooleanArrayPropertyGetFunc getfunc, BooleanArrayPropertySetFunc setfunc)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_int_default(PropertyRNA *prop, int value)
void RNA_def_py_data(PropertyRNA *prop, void *py_data)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_property_poll_runtime(PropertyRNA *prop, const void *func)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_property_update_runtime_with_context_and_property(PropertyRNA *prop, RNAPropertyUpdateFuncWithContextAndProperty func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_float_funcs_runtime(PropertyRNA *prop, FloatPropertyGetFunc getfunc, FloatPropertySetFunc setfunc, FloatPropertyRangeFunc rangefunc)
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_int_array_default(PropertyRNA *prop, const int *array)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
void RNA_def_property_int_array_funcs_runtime(PropertyRNA *prop, IntArrayPropertyGetFunc getfunc, IntArrayPropertySetFunc setfunc, IntPropertyRangeFunc rangefunc)
void RNA_def_property_float_array_funcs_runtime(PropertyRNA *prop, FloatArrayPropertyGetFunc getfunc, FloatArrayPropertySetFunc setfunc, FloatPropertyRangeFunc rangefunc)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_boolean_array_default(PropertyRNA *prop, const bool *array)
void RNA_def_property_boolean_funcs_runtime(PropertyRNA *prop, BooleanPropertyGetFunc getfunc, BooleanPropertySetFunc setfunc)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_tags(PropertyRNA *prop, int tags)
void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
void RNA_def_property_string_funcs_runtime(PropertyRNA *prop, StringPropertyGetFunc getfunc, StringPropertyLengthFunc lengthfunc, StringPropertySetFunc setfunc)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
StructRNA RNA_PropertyGroup
const EnumPropertyItem rna_enum_property_override_flag_collection_items[]
const EnumPropertyItem rna_enum_dummy_NULL_items[]
const EnumPropertyItem rna_enum_property_subtype_number_array_items[]
const EnumPropertyItem rna_enum_property_unit_items[]
const EnumPropertyItem rna_enum_property_subtype_number_items[]
const EnumPropertyItem rna_enum_property_string_search_flag_items[]
const EnumPropertyItem rna_enum_property_override_flag_items[]
const EnumPropertyItem rna_enum_property_subtype_string_items[]
const EnumPropertyItem rna_enum_property_flag_items[]
const EnumPropertyItem rna_enum_property_flag_enum_items[]
const EnumPropertyItem rna_enum_icon_items[]
int dims[RNA_MAX_ARRAY_DIMENSION]
PyGILState_STATE gilstate
struct BPyPropStore::@045253354374066325225004065140246371330176132224 py_data
struct BPyPropStore::@045253354374066325225004065140246371330176132224::@067356206063336111073261153207263225151360127245::@215275161260315117263144050163362050025006225224 pointer_data
struct BPyPropStore::@045253354374066325225004065140246371330176132224::@067356206063336111073261153207263225151360127245::@073373270032074363113064101052205365032167232105 string_data
struct BPyPropStore::@045253354374066325225004065140246371330176132224::@067356206063336111073261153207263225151360127245::@225312033354166071227014112076276313013274163254 enum_data
BPy_EnumProperty_Parse base
const EnumPropertyItem * items
std::optional< std::string > info