Blender  V3.3
Classes | Functions
py_capi_rna.h File Reference
#include "BLI_sys_types.h"

Go to the source code of this file.

Classes

struct  BPy_EnumProperty_Parse
 

Functions

char * pyrna_enum_repr (const struct EnumPropertyItem *item)
 
int pyrna_enum_value_from_id (const struct EnumPropertyItem *item, const char *identifier, int *value, const char *error_prefix)
 
unsigned int * pyrna_enum_bitmap_from_set (const struct 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 struct EnumPropertyItem *items, PyObject *value, int *r_value, const char *error_prefix)
 
PyObject * pyrna_enum_bitfield_as_set (const struct EnumPropertyItem *items, int value)
 
int pyrna_enum_value_parse_string (PyObject *o, void *p)
 
int pyrna_enum_bitfield_parse_set (PyObject *o, void *p)
 

Function Documentation

◆ pyrna_enum_bitfield_as_set()

PyObject* pyrna_enum_bitfield_as_set ( const struct EnumPropertyItem items,
int  value 
)

◆ pyrna_enum_bitfield_from_set()

int pyrna_enum_bitfield_from_set ( const struct EnumPropertyItem items,
PyObject *  value,
int *  r_value,
const char *  error_prefix 
)

'value' must be a set type, error check before calling.

◆ pyrna_enum_bitfield_parse_set()

int pyrna_enum_bitfield_parse_set ( PyObject *  o,
void p 
)

◆ pyrna_enum_bitmap_from_set()

unsigned int* pyrna_enum_bitmap_from_set ( const struct 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.

Parameters
type_convert_signMaps signed to unsigned range, needed when we want to use the full range of a signed short/char.

◆ pyrna_enum_repr()

char* pyrna_enum_repr ( const struct EnumPropertyItem item)

Convert all items into a single comma separated string. Use for creating useful error messages.

◆ pyrna_enum_value_from_id()

int pyrna_enum_value_from_id ( const struct EnumPropertyItem item,
const char *  identifier,
int *  value,
const char *  error_prefix 
)

Same as RNA_enum_value_from_id, but raises an exception.

◆ pyrna_enum_value_parse_string()

int pyrna_enum_value_parse_string ( PyObject *  o,
void p 
)