|
Blender
V2.93
|
#include <Python.h>#include "MEM_guardedalloc.h"#include "BLI_utildefines.h"#include "idprop_py_api.h"#include "BKE_idprop.h"#include "DNA_ID.h"#include "py_capi_utils.h"#include "python_utildefines.h"Go to the source code of this file.
Macros | |
| #define | USE_STRING_COERCE |
Functions | |
| bool | pyrna_id_FromPyObject (PyObject *obj, ID **id) |
| PyObject * | pyrna_id_CreatePyObject (ID *id) |
| bool | pyrna_id_CheckPyObject (PyObject *obj) |
Python from ID-Property (Internal Conversions) | |
Low level conversion to avoid duplicate code, no type checking. | |
| static PyObject * | idprop_py_from_idp_string (const IDProperty *prop) |
| static PyObject * | idprop_py_from_idp_int (const IDProperty *prop) |
| static PyObject * | idprop_py_from_idp_float (const IDProperty *prop) |
| static PyObject * | idprop_py_from_idp_double (const IDProperty *prop) |
| static PyObject * | idprop_py_from_idp_group (ID *id, IDProperty *prop, IDProperty *parent) |
| static PyObject * | idprop_py_from_idp_id (IDProperty *prop) |
| static PyObject * | idprop_py_from_idp_array (ID *id, IDProperty *prop) |
| static PyObject * | idprop_py_from_idp_idparray (ID *id, IDProperty *prop) |
ID-Property from Python (Internal Conversions) | |
| static IDProperty * | idp_from_PyFloat (const char *name, PyObject *ob) |
| static IDProperty * | idp_from_PyLong (const char *name, PyObject *ob) |
| static IDProperty * | idp_from_PyUnicode (const char *name, PyObject *ob) |
| static IDProperty * | idp_from_PyBytes (const char *name, PyObject *ob) |
| static int | idp_array_type_from_formatstr_and_size (const char *typestr, Py_ssize_t itemsize) |
| static const char * | idp_format_from_array_type (int type) |
| static IDProperty * | idp_from_PySequence_Buffer (const char *name, Py_buffer *buffer) |
| static IDProperty * | idp_from_PySequence_Fast (const char *name, PyObject *ob) |
| static IDProperty * | idp_from_PySequence (const char *name, PyObject *ob) |
| static IDProperty * | idp_from_PyMapping (const char *name, PyObject *ob) |
| static IDProperty * | idp_from_DatablockPointer (const char *name, PyObject *ob) |
| static IDProperty * | idp_from_PyObject (PyObject *name_obj, PyObject *ob) |
Mapping Get/Set (Internal Access) | |
| bool | BPy_IDProperty_Map_ValidateAndCreate (PyObject *name_obj, IDProperty *group, PyObject *ob) |
| int | BPy_Wrap_SetMapItem (IDProperty *prop, PyObject *key, PyObject *val) |
| static int | BPy_IDGroup_Map_SetItem (BPy_IDProperty *self, PyObject *key, PyObject *val) |
| static PyObject * | BPy_IDGroup_iter (BPy_IDProperty *self) |
| PyObject * | BPy_IDGroup_MapDataToPy (IDProperty *prop) |
Variables | |
ID-Property Group Type | |
| static PySequenceMethods | BPy_IDGroup_Seq |
| static PyMappingMethods | BPy_IDGroup_Mapping |
| PyTypeObject | BPy_IDGroup_Type |
ID Array Type | |
| PyTypeObject | BPy_IDArray_Type |
IDProp Group Access | |
| static PyGetSetDef | BPy_IDGroup_getseters [] |
| static Py_hash_t | BPy_IDGroup_hash (BPy_IDProperty *self) |
| static PyObject * | BPy_IDGroup_repr (BPy_IDProperty *self) |
| PyObject * | BPy_IDGroup_WrapData (ID *id, IDProperty *prop, IDProperty *parent) |
| static PyObject * | BPy_IDGroup_GetName (BPy_IDProperty *self, void *UNUSED(closure)) |
| static int | BPy_IDGroup_SetName (BPy_IDProperty *self, PyObject *value, void *UNUSED(closure)) |
| static Py_ssize_t | BPy_IDGroup_Map_Len (BPy_IDProperty *self) |
| static PyObject * | BPy_IDGroup_Map_GetItem (BPy_IDProperty *self, PyObject *item) |
| static char | idp_sequence_type (PyObject *seq_fast) |
| static const char * | idp_try_read_name (PyObject *name_obj) |
ID-Property Group Methods | |
| static struct PyMethodDef | BPy_IDGroup_methods [] |
| PyDoc_STRVAR (BPy_IDGroup_pop_doc, ".. method:: pop(key, default)\n" "\n" " Remove an item from the group, returning a Python representation.\n" "\n" " :raises KeyError: When the item doesn't exist.\n" "\n" " :arg key: Name of item to remove.\n" " :type key: string\n" " :arg default: Value to return when key isn't found, otherwise raise an exception.\n" " :type default: Undefined\n") | |
| static PyObject * | BPy_IDGroup_pop (BPy_IDProperty *self, PyObject *args) |
| PyDoc_STRVAR (BPy_IDGroup_iter_items_doc, ".. method:: iteritems()\n" "\n" " Iterate through the items in the dict; behaves like dictionary method iteritems.\n") | |
| static PyObject * | BPy_IDGroup_iter_items (BPy_IDProperty *self) |
| static void | BPy_IDGroup_CorrectListLen (IDProperty *prop, PyObject *seq, int len, const char *func) |
| PyObject * | BPy_Wrap_GetKeys (IDProperty *prop) |
| PyObject * | BPy_Wrap_GetValues (ID *id, IDProperty *prop) |
| PyObject * | BPy_Wrap_GetItems (ID *id, IDProperty *prop) |
| PyDoc_STRVAR (BPy_IDGroup_keys_doc, ".. method:: keys()\n" "\n" " Return the keys associated with this group as a list of strings.\n") | |
| static PyObject * | BPy_IDGroup_keys (BPy_IDProperty *self) |
| PyDoc_STRVAR (BPy_IDGroup_values_doc, ".. method:: values()\n" "\n" " Return the values associated with this group.\n") | |
| static PyObject * | BPy_IDGroup_values (BPy_IDProperty *self) |
| PyDoc_STRVAR (BPy_IDGroup_items_doc, ".. method:: items()\n" "\n" " Return the items associated with this group.\n") | |
| static PyObject * | BPy_IDGroup_items (BPy_IDProperty *self) |
| static int | BPy_IDGroup_Contains (BPy_IDProperty *self, PyObject *value) |
| PyDoc_STRVAR (BPy_IDGroup_update_doc, ".. method:: update(other)\n" "\n" " Update key, values.\n" "\n" " :arg other: Updates the values in the group with this.\n" " :type other: :class:`IDPropertyGroup` or dict\n") | |
| static PyObject * | BPy_IDGroup_update (BPy_IDProperty *self, PyObject *value) |
| PyDoc_STRVAR (BPy_IDGroup_to_dict_doc, ".. method:: to_dict()\n" "\n" " Return a purely python version of the group.\n") | |
| static PyObject * | BPy_IDGroup_to_dict (BPy_IDProperty *self) |
| PyDoc_STRVAR (BPy_IDGroup_clear_doc, ".. method:: clear()\n" "\n" " Clear all members from this group.\n") | |
| static PyObject * | BPy_IDGroup_clear (BPy_IDProperty *self) |
| PyDoc_STRVAR (BPy_IDGroup_get_doc, ".. method:: get(key, default=None)\n" "\n" " Return the value for key, if it exists, else default.\n") | |
| static PyObject * | BPy_IDGroup_get (BPy_IDProperty *self, PyObject *args) |
ID Array Methods | |
| static PyGetSetDef | BPy_IDArray_getseters [] |
| static PyMethodDef | BPy_IDArray_methods [] |
| static PySequenceMethods | BPy_IDArray_Seq |
| static PyMappingMethods | BPy_IDArray_AsMapping |
| static PyBufferProcs | BPy_IDArray_Buffer |
| static PyTypeObject * | idp_array_py_type (BPy_IDArray *self, bool *r_is_double) |
| static PyObject * | BPy_IDArray_repr (BPy_IDArray *self) |
| PyDoc_STRVAR (BPy_IDArray_get_typecode_doc, "The type of the data in the array {'f': float, 'd': double, 'i': int}.") | |
| static PyObject * | BPy_IDArray_get_typecode (BPy_IDArray *self) |
| PyDoc_STRVAR (BPy_IDArray_to_list_doc, ".. method:: to_list()\n" "\n" " Return the array as a list.\n") | |
| static PyObject * | BPy_IDArray_to_list (BPy_IDArray *self) |
| static int | BPy_IDArray_Len (BPy_IDArray *self) |
| static PyObject * | BPy_IDArray_GetItem (BPy_IDArray *self, int index) |
| static int | BPy_IDArray_SetItem (BPy_IDArray *self, int index, PyObject *value) |
| static PyObject * | BPy_IDArray_slice (BPy_IDArray *self, int begin, int end) |
| static int | BPy_IDArray_ass_slice (BPy_IDArray *self, int begin, int end, PyObject *seq) |
| static PyObject * | BPy_IDArray_subscript (BPy_IDArray *self, PyObject *item) |
| static int | BPy_IDArray_ass_subscript (BPy_IDArray *self, PyObject *item, PyObject *value) |
| static int | itemsize_by_idarray_type (int array_type) |
| static int | BPy_IDArray_getbuffer (BPy_IDArray *self, Py_buffer *view, int flags) |
| static void | BPy_IDArray_releasebuffer (BPy_IDArray *UNUSED(self), Py_buffer *view) |
ID-Property Group Iterator Type | |
| PyTypeObject | BPy_IDGroup_Iter_Type |
| static PyObject * | IDGroup_Iter_repr (BPy_IDGroup_Iter *self) |
| static void | BPy_IDGroup_Iter_dealloc (BPy_IDGroup_Iter *self) |
| static int | BPy_IDGroup_Iter_traverse (BPy_IDGroup_Iter *self, visitproc visit, void *arg) |
| static int | BPy_IDGroup_Iter_clear (BPy_IDGroup_Iter *self) |
| static PyObject * | BPy_Group_Iter_Next (BPy_IDGroup_Iter *self) |
| void | IDProp_Init_Types (void) |
Public Module 'idprop.types' | |
| static struct PyModuleDef | IDProp_types_module_def |
| static PyObject * | BPyInit_idprop_types (void) |
Public Module 'idprop' | |
| static PyMethodDef | IDProp_methods [] |
| static struct PyModuleDef | IDProp_module_def |
| PyDoc_STRVAR (IDProp_module_doc, "This module provides access id property types (currently mainly for docs).") | |
| PyObject * | BPyInit_idprop (void) |
| #define USE_STRING_COERCE |
Definition at line 33 of file idprop_py_api.c.
|
static |
Definition at line 1711 of file idprop_py_api.c.
References BPy_IDGroup_WrapData(), IDPROP_ITER_ITEMS, IDProperty::name, IDProperty::next, NULL, PyTuple_SET_ITEMS, ret, and self.
|
static |
Definition at line 1445 of file idprop_py_api.c.
References CLAMP, double(), IDP_Array, idp_array_py_type(), IDProperty::len, MEM_freeN, MEM_mallocN, MIN2, PyC_AsArray(), and size().
Referenced by BPy_IDArray_ass_subscript().
|
static |
Definition at line 1514 of file idprop_py_api.c.
References BPy_IDArray_ass_slice(), BPy_IDArray_SetItem(), and self.
|
static |
Definition at line 1283 of file idprop_py_api.c.
References IDP_DOUBLE, IDP_FLOAT, IDP_INT, NULL, and self.
|
static |
Definition at line 1566 of file idprop_py_api.c.
References IDP_Array, idp_format_from_array_type(), itemsize_by_idarray_type(), IDProperty::len, length(), MEM_mallocN, IDProperty::subtype, and view.
|
static |
Definition at line 1329 of file idprop_py_api.c.
References IDP_Array, IDP_DOUBLE, IDP_FLOAT, IDP_INT, NULL, and self.
Referenced by BPy_IDArray_subscript().
|
static |
Definition at line 1324 of file idprop_py_api.c.
|
static |
Definition at line 1586 of file idprop_py_api.c.
|
static |
Definition at line 1276 of file idprop_py_api.c.
References self.
|
static |
Definition at line 1351 of file idprop_py_api.c.
References float(), IDP_Array, IDP_DOUBLE, IDP_FLOAT, IDP_INT, and self.
Referenced by BPy_IDArray_ass_subscript().
|
static |
Definition at line 1403 of file idprop_py_api.c.
References CLAMP, count, IDP_Array, IDP_DOUBLE, IDP_FLOAT, IDP_INT, IDProperty::len, MIN2, and IDProperty::subtype.
Referenced by BPy_IDArray_subscript().
|
static |
Definition at line 1476 of file idprop_py_api.c.
References BPy_IDArray_GetItem(), BPy_IDArray_slice(), NULL, and self.
|
static |
Definition at line 1314 of file idprop_py_api.c.
References BPy_IDGroup_MapDataToPy(), and self.
|
static |
Definition at line 1120 of file idprop_py_api.c.
References IDP_ClearProperty(), and self.
|
static |
Definition at line 1056 of file idprop_py_api.c.
References IDP_GetPropertyFromGroup(), and self.
|
static |
Definition at line 946 of file idprop_py_api.c.
References len, and IDProperty::len.
Referenced by BPy_Wrap_GetItems(), BPy_Wrap_GetKeys(), and BPy_Wrap_GetValues().
|
static |
Definition at line 1130 of file idprop_py_api.c.
References BPy_IDGroup_WrapData(), IDP_GetPropertyFromGroup(), NULL, and self.
|
static |
Definition at line 241 of file idprop_py_api.c.
References self.
|
static |
Definition at line 135 of file idprop_py_api.c.
References self.
|
static |
Definition at line 1051 of file idprop_py_api.c.
References BPy_Wrap_GetItems(), and self.
|
static |
Definition at line 760 of file idprop_py_api.c.
References BPy_IDGroup_Iter_Type, BPy_IDGroup_Iter::cur, IDProperty::data, ListBase::first, IDPropertyData::group, BPy_IDGroup_Iter::group, IDPROP_ITER_KEYS, and BPy_IDGroup_Iter::mode.
|
static |
Definition at line 1705 of file idprop_py_api.c.
References self.
|
static |
Definition at line 1692 of file idprop_py_api.c.
References self.
|
static |
Definition at line 934 of file idprop_py_api.c.
References BPy_IDGroup_Iter_Type, BPy_IDGroup_Iter::cur, IDProperty::data, ListBase::first, IDPropertyData::group, BPy_IDGroup_Iter::group, IDPROP_ITER_ITEMS, and BPy_IDGroup_Iter::mode.
|
static |
Definition at line 1699 of file idprop_py_api.c.
References self.
|
static |
Definition at line 1033 of file idprop_py_api.c.
References BPy_Wrap_GetKeys(), and self.
|
static |
Definition at line 293 of file idprop_py_api.c.
References BPy_IDGroup_WrapData(), IDP_GetPropertyFromGroup(), IDP_GROUP, NULL, and self.
|
static |
Definition at line 283 of file idprop_py_api.c.
|
static |
Definition at line 755 of file idprop_py_api.c.
References BPy_Wrap_SetMapItem(), and self.
Referenced by BPy_IDGroup_update().
| PyObject* BPy_IDGroup_MapDataToPy | ( | IDProperty * | prop | ) |
Definition at line 772 of file idprop_py_api.c.
References IDProperty::data, ListBase::first, IDPropertyData::group, IDP_Array, IDP_ARRAY, IDP_DOUBLE, IDP_FLOAT, IDP_GROUP, IDP_ID, IDP_IDPArray, IDP_IDPARRAY, IDP_INT, IDP_STRING, idprop_py_from_idp_double(), idprop_py_from_idp_float(), idprop_py_from_idp_id(), idprop_py_from_idp_int(), idprop_py_from_idp_string(), IDProperty::len, IDProperty::name, IDProperty::next, NULL, IDProperty::subtype, IDProperty::type, UNLIKELY, and blender::gpu::wrap().
Referenced by BPy_IDArray_to_list(), BPy_IDGroup_pop(), BPy_IDGroup_to_dict(), and pyrna_struct_pop().
|
static |
Definition at line 896 of file idprop_py_api.c.
References BPy_IDGroup_MapDataToPy(), IDP_FreeFromGroup(), IDP_GetPropertyFromGroup(), NULL, and self.
|
static |
Definition at line 140 of file idprop_py_api.c.
References self.
|
static |
Definition at line 246 of file idprop_py_api.c.
References MAX_IDPROP_NAME, and self.
|
static |
Definition at line 1111 of file idprop_py_api.c.
References BPy_IDGroup_MapDataToPy(), and self.
|
static |
Definition at line 1075 of file idprop_py_api.c.
References BPy_IDGroup_Check, BPy_IDGroup_Map_SetItem(), IDP_MergeGroup(), NULL, BPy_IDProperty::prop, self, and UNLIKELY.
|
static |
Definition at line 1042 of file idprop_py_api.c.
References BPy_Wrap_GetValues(), and self.
| PyObject* BPy_IDGroup_WrapData | ( | ID * | id, |
| IDProperty * | prop, | ||
| IDProperty * | parent | ||
| ) |
Definition at line 148 of file idprop_py_api.c.
References IDP_ARRAY, IDP_DOUBLE, IDP_FLOAT, IDP_GROUP, IDP_ID, IDP_IDPARRAY, IDP_INT, IDP_STRING, idprop_py_from_idp_array(), idprop_py_from_idp_double(), idprop_py_from_idp_float(), idprop_py_from_idp_group(), idprop_py_from_idp_id(), idprop_py_from_idp_idparray(), idprop_py_from_idp_int(), idprop_py_from_idp_string(), and IDProperty::type.
Referenced by BPy_Group_Iter_Next(), BPy_IDGroup_get(), BPy_IDGroup_Map_GetItem(), BPy_Wrap_GetItems(), BPy_Wrap_GetValues(), idprop_py_from_idp_idparray(), pyrna_struct_get(), and pyrna_struct_subscript().
| bool BPy_IDProperty_Map_ValidateAndCreate | ( | PyObject * | name_obj, |
| IDProperty * | group, | ||
| PyObject * | ob | ||
| ) |
Definition at line 682 of file idprop_py_api.c.
References IDProperty::flag, IDP_AppendArray(), IDP_FreePropertyContent(), idp_from_PyObject(), IDP_GetPropertyFromGroup(), IDP_IDPARRAY, IDP_ReplaceInGroup_ex(), MEM_freeN, IDProperty::name, IDProperty::next, NULL, IDProperty::prev, IDProperty::subtype, and IDProperty::type.
Referenced by BPy_Wrap_SetMapItem(), idp_from_PyMapping(), and idp_from_PySequence_Fast().
| PyObject* BPy_Wrap_GetItems | ( | ID * | id, |
| IDProperty * | prop | ||
| ) |
Definition at line 1006 of file idprop_py_api.c.
References BPy_IDGroup_CorrectListLen(), BPy_IDGroup_WrapData(), IDProperty::data, ListBase::first, IDPropertyData::group, IDProperty::len, IDProperty::name, IDProperty::next, and PyTuple_SET_ITEMS.
Referenced by BPy_IDGroup_items(), and pyrna_struct_items().
| PyObject* BPy_Wrap_GetKeys | ( | IDProperty * | prop | ) |
Definition at line 961 of file idprop_py_api.c.
References BPy_IDGroup_CorrectListLen(), IDProperty::data, ListBase::first, IDPropertyData::group, len, IDProperty::len, IDProperty::name, and IDProperty::next.
Referenced by BPy_IDGroup_keys(), and pyrna_struct_keys().
| PyObject* BPy_Wrap_GetValues | ( | ID * | id, |
| IDProperty * | prop | ||
| ) |
Definition at line 986 of file idprop_py_api.c.
References BPy_IDGroup_CorrectListLen(), BPy_IDGroup_WrapData(), IDProperty::data, ListBase::first, IDPropertyData::group, IDProperty::len, and IDProperty::next.
Referenced by BPy_IDGroup_values(), and pyrna_struct_values().
| int BPy_Wrap_SetMapItem | ( | IDProperty * | prop, |
| PyObject * | key, | ||
| PyObject * | val | ||
| ) |
Definition at line 719 of file idprop_py_api.c.
References BPy_IDProperty_Map_ValidateAndCreate(), IDP_FreeFromGroup(), IDP_GetPropertyFromGroup(), IDP_GROUP, NULL, and IDProperty::type.
Referenced by BPy_IDGroup_Map_SetItem(), and pyrna_struct_ass_subscript().
| PyObject* BPyInit_idprop | ( | void | ) |
Definition at line 1858 of file idprop_py_api.c.
References BPyInit_idprop_types(), IDProp_module_def, and mod().
|
static |
Definition at line 1818 of file idprop_py_api.c.
References BPy_IDArray_Type, BPy_IDGroup_Iter_Type, BPy_IDGroup_Type, IDProp_Init_Types(), and IDProp_types_module_def.
Referenced by BPyInit_idprop().
|
static |
Definition at line 1687 of file idprop_py_api.c.
References self.
|
static |
Definition at line 1258 of file idprop_py_api.c.
References IDP_DOUBLE, IDP_FLOAT, IDP_INT, NULL, and self.
Referenced by BPy_IDArray_ass_slice().
|
static |
Definition at line 438 of file idprop_py_api.c.
References IDP_DOUBLE, IDP_FLOAT, IDP_INT, PyC_StructFmt_type_from_str(), PyC_StructFmt_type_is_float_any(), and PyC_StructFmt_type_is_int_any().
Referenced by idp_from_PySequence_Buffer().
|
static |
Definition at line 459 of file idprop_py_api.c.
References IDP_DOUBLE, IDP_FLOAT, IDP_INT, NULL, and type.
Referenced by BPy_IDArray_getbuffer().
|
static |
Definition at line 629 of file idprop_py_api.c.
References IDPropertyTemplate::id, IDP_ID, IDP_New(), and pyrna_id_FromPyObject().
Referenced by idp_from_PyObject().
|
static |
Definition at line 429 of file idprop_py_api.c.
References IDP_New(), IDP_STRING, IDP_STRING_SUB_BYTE, IDPropertyTemplate::len, IDPropertyTemplate::str, IDPropertyTemplate::string, and IDPropertyTemplate::subtype.
Referenced by idp_from_PyObject().
|
static |
The 'idp_from_Py*' functions expect that the input type has been checked before and return NULL if the IDProperty can't be created.
Definition at line 393 of file idprop_py_api.c.
References IDPropertyTemplate::d, IDP_DOUBLE, and IDP_New().
Referenced by idp_from_PyObject().
|
static |
Definition at line 400 of file idprop_py_api.c.
References IDPropertyTemplate::i, IDP_INT, IDP_New(), and NULL.
Referenced by idp_from_PyObject().
|
static |
Definition at line 594 of file idprop_py_api.c.
References BPy_IDProperty_Map_ValidateAndCreate(), IDP_FreeProperty(), IDP_GROUP, IDP_New(), len, and NULL.
Referenced by idp_from_PyObject().
|
static |
Definition at line 636 of file idprop_py_api.c.
References idp_from_DatablockPointer(), idp_from_PyBytes(), idp_from_PyFloat(), idp_from_PyLong(), idp_from_PyMapping(), idp_from_PySequence(), idp_from_PyUnicode(), idp_try_read_name(), NULL, and pyrna_id_CheckPyObject().
Referenced by BPy_IDProperty_Map_ValidateAndCreate().
|
static |
Definition at line 561 of file idprop_py_api.c.
References buffer, idp_from_PySequence_Buffer(), idp_from_PySequence_Fast(), NULL, PyC_StructFmt_type_from_str(), PyC_StructFmt_type_is_float_any(), and PyC_StructFmt_type_is_int_any().
Referenced by idp_from_PyObject().
|
static |
Definition at line 473 of file idprop_py_api.c.
References IDPropertyTemplate::array, buffer, IDP_Array, IDP_ARRAY, idp_array_type_from_formatstr_and_size(), IDP_New(), IDPropertyTemplate::len, NULL, and IDPropertyTemplate::type.
Referenced by idp_from_PySequence().
|
static |
Definition at line 492 of file idprop_py_api.c.
References IDPropertyTemplate::array, BPy_IDProperty_Map_ValidateAndCreate(), IDP_Array, IDP_ARRAY, IDP_DOUBLE, IDP_FreeProperty(), IDP_IDPARRAY, IDP_INT, IDP_New(), IDP_NewIDPArray(), idp_sequence_type(), IDPropertyTemplate::len, NULL, and IDPropertyTemplate::type.
Referenced by idp_from_PySequence().
|
static |
Definition at line 410 of file idprop_py_api.c.
References IDP_New(), IDP_STRING, IDP_STRING_SUB_UTF8, IDPropertyTemplate::len, NULL, PyC_UnicodeAsByteAndSize(), IDPropertyTemplate::str, IDPropertyTemplate::string, and IDPropertyTemplate::subtype.
Referenced by idp_from_PyObject().
|
static |
Definition at line 321 of file idprop_py_api.c.
References IDP_DOUBLE, IDP_IDPARRAY, IDP_INT, len, and type.
Referenced by idp_from_PySequence_Fast().
|
static |
Definition at line 356 of file idprop_py_api.c.
References MAX_IDPROP_NAME, and NULL.
Referenced by idp_from_PyObject().
| void IDProp_Init_Types | ( | void | ) |
Definition at line 1793 of file idprop_py_api.c.
References BPy_IDArray_Type, BPy_IDGroup_Iter_Type, and BPy_IDGroup_Type.
Referenced by BPy_init_modules(), and BPyInit_idprop_types().
|
static |
Definition at line 93 of file idprop_py_api.c.
References BPy_IDArray_Type, and id.
Referenced by BPy_IDGroup_WrapData().
|
static |
Definition at line 74 of file idprop_py_api.c.
References IDP_Double.
Referenced by BPy_IDGroup_MapDataToPy(), and BPy_IDGroup_WrapData().
|
static |
Definition at line 69 of file idprop_py_api.c.
References IDP_Float.
Referenced by BPy_IDGroup_MapDataToPy(), and BPy_IDGroup_WrapData().
|
static |
Definition at line 79 of file idprop_py_api.c.
References BPy_IDGroup_Type, id, BPy_IDProperty::id, BPy_IDProperty::parent, and BPy_IDProperty::prop.
Referenced by BPy_IDGroup_WrapData().
|
static |
Definition at line 88 of file idprop_py_api.c.
References IDProperty::data, IDPropertyData::pointer, and pyrna_id_CreatePyObject().
Referenced by BPy_IDGroup_MapDataToPy(), and BPy_IDGroup_WrapData().
|
static |
Definition at line 101 of file idprop_py_api.c.
References BPy_IDGroup_WrapData(), IDP_IDPArray, IDProperty::len, NULL, UNLIKELY, and blender::gpu::wrap().
Referenced by BPy_IDGroup_WrapData().
|
static |
Definition at line 64 of file idprop_py_api.c.
References IDP_Int.
Referenced by BPy_IDGroup_MapDataToPy(), and BPy_IDGroup_WrapData().
|
static |
Definition at line 51 of file idprop_py_api.c.
References IDP_Array, IDP_String, IDP_STRING_SUB_BYTE, IDProperty::len, PyC_UnicodeFromByteAndSize(), and IDProperty::subtype.
Referenced by BPy_IDGroup_MapDataToPy(), and BPy_IDGroup_WrapData().
|
static |
Definition at line 1552 of file idprop_py_api.c.
References double(), float(), IDP_DOUBLE, IDP_FLOAT, and IDP_INT.
Referenced by BPy_IDArray_getbuffer().
| PyDoc_STRVAR | ( | BPy_IDArray_get_typecode_doc | , |
| "The type of the data in the array {'f': float, 'd': double, 'i': int}." | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDArray_to_list_doc | , |
| ".. method:: to_list()\n" "\n" " Return the array as a list.\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDGroup_clear_doc | , |
| ".. method:: clear()\n" "\n" " Clear all members from this group.\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDGroup_get_doc | , |
| ".. method:: get(key, default=None)\n" "\n" " Return the value for | key, | ||
| if it | exists, | ||
| else default.\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDGroup_items_doc | , |
| ".. method:: items()\n" "\n" " Return the items associated with this group.\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDGroup_iter_items_doc | , |
| ".. method:: iteritems()\n" "\n" " Iterate through the items in the dict; behaves like dictionary method iteritems.\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDGroup_keys_doc | , |
| ".. method:: keys()\n" "\n" " Return the keys associated with this group as a list of strings.\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDGroup_pop_doc | , |
| ".. method:: pop(key, default)\n" "\n" " Remove an item from the | group, | ||
| returning a Python representation.\n" "\n" " :raises KeyError:When the item doesn 't exist.\n" "\n" " :arg key:Name of item to remove.\n" " :type key:string\n" " :arg default:Value to return when key isn 't | found, | ||
| otherwise raise an exception.\n" " :type default:Undefined\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDGroup_to_dict_doc | , |
| ".. method:: to_dict()\n" "\n" " Return a purely python version of the group.\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDGroup_update_doc | , |
| ".. method:: update(other)\n" "\n" " Update | key, | ||
| values.\n" "\n" " :arg other:Updates the values in the group with this.\n" " :type other::class:`IDPropertyGroup` or dict\n" | |||
| ) |
| PyDoc_STRVAR | ( | BPy_IDGroup_values_doc | , |
| ".. method:: values()\n" "\n" " Return the values associated with this group.\n" | |||
| ) |
| PyDoc_STRVAR | ( | IDProp_module_doc | , |
| "This module provides access id property types (currently mainly for docs)." | |||
| ) |
| bool pyrna_id_CheckPyObject | ( | PyObject * | obj | ) |
Definition at line 7633 of file bpy_rna.c.
References BPy_StructRNA_Check, ptr, RNA_struct_is_ID(), and PointerRNA::type.
Referenced by idp_from_PyObject().
| PyObject* pyrna_id_CreatePyObject | ( | ID * | id | ) |
Definition at line 7611 of file bpy_rna.c.
References ptr, pyrna_struct_CreatePyObject(), and RNA_id_pointer_create().
Referenced by bpy_user_map(), foreach_libblock_id_user_map_callback(), and idprop_py_from_idp_id().
| bool pyrna_id_FromPyObject | ( | PyObject * | obj, |
| ID ** | id | ||
| ) |
Definition at line 7622 of file bpy_rna.c.
References NULL, and pyrna_id_CheckPyObject().
Referenced by bpy_batch_remove(), bpy_lib_write(), and idp_from_DatablockPointer().
|
static |
Definition at line 1546 of file idprop_py_api.c.
|
static |
Definition at line 1591 of file idprop_py_api.c.
|
static |
Definition at line 1300 of file idprop_py_api.c.
|
static |
Definition at line 1319 of file idprop_py_api.c.
|
static |
Definition at line 1388 of file idprop_py_api.c.
| PyTypeObject BPy_IDArray_Type |
Definition at line 1600 of file idprop_py_api.c.
Referenced by BPyInit_idprop_types(), IDProp_Init_Types(), and idprop_py_from_idp_array().
|
static |
Definition at line 274 of file idprop_py_api.c.
| PyTypeObject BPy_IDGroup_Iter_Type |
Definition at line 1736 of file idprop_py_api.c.
Referenced by BPy_IDGroup_iter(), BPy_IDGroup_iter_items(), BPyInit_idprop_types(), and IDProp_Init_Types().
|
static |
Definition at line 1185 of file idprop_py_api.c.
|
static |
Definition at line 1130 of file idprop_py_api.c.
|
static |
Definition at line 1171 of file idprop_py_api.c.
| PyTypeObject BPy_IDGroup_Type |
Definition at line 1191 of file idprop_py_api.c.
Referenced by BPyInit_idprop_types(), IDProp_Init_Types(), and idprop_py_from_idp_group().
|
static |
Definition at line 1840 of file idprop_py_api.c.
|
static |
Definition at line 1844 of file idprop_py_api.c.
Referenced by BPyInit_idprop().
|
static |
Definition at line 1793 of file idprop_py_api.c.
Referenced by BPyInit_idprop_types().