Blender
V3.3
|
#include <Python.h>
#include <stdbool.h>
#include "py_capi_rna.h"
#include "BLI_bitmap.h"
#include "BLI_dynstr.h"
#include "RNA_access.h"
#include "MEM_guardedalloc.h"
Go to the source code of this file.
Macros | |
#define | PY_SSIZE_T_CLEAN |
Functions | |
Enum Utilities | |
char * | pyrna_enum_repr (const EnumPropertyItem *item) |
Enum Conversion Utilities | |
int | pyrna_enum_value_from_id (const EnumPropertyItem *item, const char *identifier, int *r_value, const char *error_prefix) |
BLI_bitmap * | pyrna_enum_bitmap_from_set (const EnumPropertyItem *items, PyObject *value, int type_size, bool type_convert_sign, int bitmap_size, const char *error_prefix) |
int | pyrna_enum_bitfield_from_set (const EnumPropertyItem *items, PyObject *value, int *r_value, const char *error_prefix) |
PyObject * | pyrna_enum_bitfield_as_set (const EnumPropertyItem *items, int value) |
Argument Parsing Helpers | |
int | pyrna_enum_value_parse_string (PyObject *o, void *p) |
int | pyrna_enum_bitfield_parse_set (PyObject *o, void *p) |
Python/RNA utilities.
RNA functions that aren't part of the bpy_rna.c
API.
Definition in file py_capi_rna.c.
#define PY_SSIZE_T_CLEAN |
Definition at line 12 of file py_capi_rna.c.
PyObject* pyrna_enum_bitfield_as_set | ( | const EnumPropertyItem * | items, |
int | value | ||
) |
Definition at line 170 of file py_capi_rna.c.
References NULL, ret, RNA_enum_bitflag_identifiers(), and RNA_ENUM_BITFLAG_SIZE.
Referenced by pyop_call().
int pyrna_enum_bitfield_from_set | ( | const EnumPropertyItem * | items, |
PyObject * | value, | ||
int * | r_value, | ||
const char * | error_prefix | ||
) |
Definition at line 133 of file py_capi_rna.c.
References hash, NULL, pos, pyrna_enum_value_from_id(), and ret.
Referenced by bpy_msgbus_subscribe_rna(), pyrna_enum_bitfield_parse_set(), pyrna_prop_to_enum_bitfield(), and pyrna_struct_keyframe_parse().
int pyrna_enum_bitfield_parse_set | ( | PyObject * | o, |
void * | p | ||
) |
Use with #PyArg_ParseTuple's O&
formatting.
Definition at line 212 of file py_capi_rna.c.
References BPy_EnumProperty_Parse::is_set, BPy_EnumProperty_Parse::items, pyrna_enum_bitfield_from_set(), BPy_EnumProperty_Parse::value, and BPy_EnumProperty_Parse::value_orig.
Referenced by BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_CollectionProperty(), BPy_EnumProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_PointerProperty(), bpy_prop_arg_parse_tag_defines(), and BPy_StringProperty().
BLI_bitmap* pyrna_enum_bitmap_from_set | ( | const EnumPropertyItem * | items, |
PyObject * | value, | ||
int | type_size, | ||
bool | type_convert_sign, | ||
int | bitmap_size, | ||
const char * | error_prefix | ||
) |
Definition at line 70 of file py_capi_rna.c.
References BLI_assert, BLI_assert_unreachable, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, error(), hash, MEM_freeN, NULL, pos, pyrna_enum_value_from_id(), and ret.
Referenced by bpy_user_map().
char* pyrna_enum_repr | ( | const EnumPropertyItem * | item | ) |
Definition at line 30 of file py_capi_rna.c.
References BLI_dynstr_appendf(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), and EnumPropertyItem::identifier.
Referenced by pyop_call(), pyop_poll(), pyrna_enum_as_string(), and pyrna_enum_value_from_id().
int pyrna_enum_value_from_id | ( | const EnumPropertyItem * | item, |
const char * | identifier, | ||
int * | r_value, | ||
const char * | error_prefix | ||
) |
Definition at line 54 of file py_capi_rna.c.
References MEM_freeN, pyrna_enum_repr(), and RNA_enum_value_from_id().
Referenced by idprop_ui_data_update_base(), pyrna_enum_bitfield_from_set(), pyrna_enum_bitmap_from_set(), and pyrna_enum_value_parse_string().
int pyrna_enum_value_parse_string | ( | PyObject * | o, |
void * | p | ||
) |
Use with #PyArg_ParseTuple's O&
formatting.
Definition at line 194 of file py_capi_rna.c.
References BPy_EnumProperty_Parse::is_set, BPy_EnumProperty_Parse::items, NULL, pyrna_enum_value_from_id(), BPy_EnumProperty_Parse::value, and BPy_EnumProperty_Parse::value_orig.
Referenced by bpy_app_is_job_running(), BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), bpy_gizmotype_target_property_def(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_StringProperty(), pyrna_callback_classmethod_add(), and pyrna_callback_classmethod_remove().