|
Blender V4.3
|
#include "BLI_sys_types.h"Go to the source code of this file.
Classes | |
| struct | BPy_EnumProperty_Parse |
Functions | |
| char * | pyrna_enum_repr (const EnumPropertyItem *item) |
| int | pyrna_enum_value_from_id (const EnumPropertyItem *item, const char *identifier, int *r_value, const char *error_prefix) |
| unsigned int * | 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) |
| int | pyrna_enum_value_parse_string (PyObject *o, void *p) |
| int | pyrna_enum_bitfield_parse_set (PyObject *o, void *p) |
| PyObject * pyrna_enum_bitfield_as_set | ( | const EnumPropertyItem * | items, |
| int | value ) |
Definition at line 171 of file py_capi_rna.cc.
References ret, RNA_enum_bitflag_identifiers(), and RNA_ENUM_BITFLAG_SIZE.
Referenced by pyop_call(), and pyop_get_bl_options().
| int pyrna_enum_bitfield_from_set | ( | const EnumPropertyItem * | items, |
| PyObject * | value, | ||
| int * | r_value, | ||
| const char * | error_prefix ) |
'value' must be a set type, error check before calling.
Definition at line 134 of file py_capi_rna.cc.
References flag, hash, 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 214 of file py_capi_rna.cc.
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().
| unsigned int * pyrna_enum_bitmap_from_set | ( | const EnumPropertyItem * | items, |
| PyObject * | value, | ||
| int | type_size, | ||
| bool | type_convert_sign, | ||
| int | bitmap_size, | ||
| const char * | error_prefix ) |
Takes a set of strings and map it to and array of booleans.
Useful when the values aren't flags.
| type_convert_sign | Maps signed to unsigned range, needed when we want to use the full range of a signed short/char. |
Definition at line 71 of file py_capi_rna.cc.
References BLI_assert, BLI_assert_unreachable, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, error(), hash, int, MEM_freeN(), pos, pyrna_enum_value_from_id(), and ret.
Referenced by bpy_user_map().
| char * pyrna_enum_repr | ( | const EnumPropertyItem * | item | ) |
Convert all items into a single comma separated string. Use for creating useful error messages.
Definition at line 31 of file py_capi_rna.cc.
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 ) |
Same as RNA_enum_value_from_id, but raises an exception.
Definition at line 55 of file py_capi_rna.cc.
References MEM_freeN(), pyrna_enum_repr(), and RNA_enum_value_from_id().
Referenced by idprop_ui_data_update_base(), idprop_ui_data_update_id(), pyrna_enum_bitfield_from_set(), pyrna_enum_bitmap_from_set(), pyrna_enum_value_parse_string(), and pyrna_struct_keyframe_parse().
| int pyrna_enum_value_parse_string | ( | PyObject * | o, |
| void * | p ) |
Use with #PyArg_ParseTuple's O& formatting.
Definition at line 195 of file py_capi_rna.cc.
References BPy_EnumProperty_Parse::is_set, BPy_EnumProperty_Parse::items, 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().