|
Blender V4.3
|
#include <Python.h>#include "CLG_log.h"#include "BLI_utildefines.h"#include "RNA_types.hh"#include "bpy_rna.hh"#include "MEM_guardedalloc.h"#include "RNA_access.hh"#include "BPY_extern_clog.hh"#include "../generic/py_capi_utils.hh"#include "../mathutils/mathutils.hh"Go to the source code of this file.
Classes | |
| struct | ItemConvertArgData |
| struct | ItemConvert_FuncArg |
Macros | |
| #define | USE_MATHUTILS |
| #define | MAX_ARRAY_DIMENSION 10 |
Typedefs | |
| using | ItemConvertFunc = void (*)(const ItemConvertArgData *arg, PyObject *py_data, char *data) |
| using | ItemTypeCheckFunc = int (*)(PyObject *py_data) |
| using | RNA_SetArrayFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, const char *data) |
| using | RNA_SetIndexFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, int index, void *data_item) |
Functions | |
| static int | validate_array_type (PyObject *seq, int dim, int totdim, int dimsize[], const bool is_dynamic, ItemTypeCheckFunc check_item_type, const char *item_type_str, const char *error_prefix) |
| static int | count_items (PyObject *seq, int dim) |
| static int | validate_array_length (PyObject *rvalue, PointerRNA *ptr, PropertyRNA *prop, const bool prop_is_param_dyn_alloc, int lvalue_dim, int *r_totitem, const char *error_prefix) |
| static int | validate_array (PyObject *rvalue, PointerRNA *ptr, PropertyRNA *prop, const bool prop_is_param_dyn_alloc, int lvalue_dim, ItemTypeCheckFunc check_item_type, const char *item_type_str, int *r_totitem, const char *error_prefix) |
| static char * | copy_value_single (PyObject *item, PointerRNA *ptr, PropertyRNA *prop, char *data, uint item_size, int *index, const ItemConvert_FuncArg *convert_item, RNA_SetIndexFunc rna_set_index) |
| static char * | copy_values (PyObject *seq, PointerRNA *ptr, PropertyRNA *prop, int dim, char *data, uint item_size, int *index, const ItemConvert_FuncArg *convert_item, RNA_SetIndexFunc rna_set_index) |
| static int | py_to_array (PyObject *seq, PointerRNA *ptr, PropertyRNA *prop, char *param_data, ItemTypeCheckFunc check_item_type, const char *item_type_str, int item_size, const ItemConvert_FuncArg *convert_item, RNA_SetArrayFunc rna_set_array, const char *error_prefix) |
| static int | py_to_array_index (PyObject *py, PointerRNA *ptr, PropertyRNA *prop, int lvalue_dim, int arrayoffset, int index, ItemTypeCheckFunc check_item_type, const char *item_type_str, const ItemConvert_FuncArg *convert_item, RNA_SetIndexFunc rna_set_index, const char *error_prefix) |
| static void | py_to_float (const ItemConvertArgData *arg, PyObject *py, char *data) |
| static void | py_to_int (const ItemConvertArgData *arg, PyObject *py, char *data) |
| static void | py_to_bool (const ItemConvertArgData *, PyObject *py, char *data) |
| static int | py_float_check (PyObject *py) |
| static int | py_int_check (PyObject *py) |
| static int | py_bool_check (PyObject *py) |
| static void | float_set_index (PointerRNA *ptr, PropertyRNA *prop, int index, void *value) |
| static void | int_set_index (PointerRNA *ptr, PropertyRNA *prop, int index, void *value) |
| static void | bool_set_index (PointerRNA *ptr, PropertyRNA *prop, int index, void *value) |
| static void | convert_item_init_float (PointerRNA *ptr, PropertyRNA *prop, ItemConvert_FuncArg *convert_item) |
| static void | convert_item_init_int (PointerRNA *ptr, PropertyRNA *prop, ItemConvert_FuncArg *convert_item) |
| static void | convert_item_init_bool (PointerRNA *, PropertyRNA *, ItemConvert_FuncArg *convert_item) |
| int | pyrna_py_to_array (PointerRNA *ptr, PropertyRNA *prop, char *param_data, PyObject *py, const char *error_prefix) |
| int | pyrna_py_to_array_index (PointerRNA *ptr, PropertyRNA *prop, int arraydim, int arrayoffset, int index, PyObject *py, const char *error_prefix) |
| PyObject * | pyrna_array_index (PointerRNA *ptr, PropertyRNA *prop, int index) |
| PyObject * | pyrna_py_from_array_index (BPy_PropertyArrayRNA *self, PointerRNA *ptr, PropertyRNA *prop, int index) |
| PyObject * | pyrna_py_from_array (PointerRNA *ptr, PropertyRNA *prop) |
| int | pyrna_array_contains_py (PointerRNA *ptr, PropertyRNA *prop, PyObject *value) |
This file deals with array access for 'BPy_PropertyArrayRNA' from bpy_rna.cc.
Definition in file bpy_rna_array.cc.
| #define MAX_ARRAY_DIMENSION 10 |
Definition at line 35 of file bpy_rna_array.cc.
Referenced by py_to_array_index(), pyrna_py_from_array_index(), validate_array(), and validate_array_length().
| #define USE_MATHUTILS |
Definition at line 29 of file bpy_rna_array.cc.
| using ItemConvertFunc = void (*)(const ItemConvertArgData *arg, PyObject *py_data, char *data) |
Definition at line 39 of file bpy_rna_array.cc.
| using ItemTypeCheckFunc = int (*)(PyObject *py_data) |
Definition at line 40 of file bpy_rna_array.cc.
| using RNA_SetArrayFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, const char *data) |
Definition at line 41 of file bpy_rna_array.cc.
| using RNA_SetIndexFunc = void (*)(PointerRNA *ptr, PropertyRNA *prop, int index, void *data_item) |
Definition at line 42 of file bpy_rna_array.cc.
|
static |
Definition at line 711 of file bpy_rna_array.cc.
References ptr, and RNA_property_boolean_set_index().
Referenced by pyrna_py_to_array_index().
|
static |
Definition at line 734 of file bpy_rna_array.cc.
References ItemConvert_FuncArg::func, and py_to_bool().
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
|
static |
Definition at line 716 of file bpy_rna_array.cc.
References ItemConvert_FuncArg::arg, ItemConvertArgData::float_data, ItemConvert_FuncArg::func, ptr, py_to_float(), ItemConvertArgData::range, and RNA_property_float_range().
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
|
static |
Definition at line 725 of file bpy_rna_array.cc.
References ItemConvert_FuncArg::arg, ItemConvert_FuncArg::func, ItemConvertArgData::int_data, ptr, py_to_int(), ItemConvertArgData::range, and RNA_property_int_range().
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
|
static |
Definition at line 417 of file bpy_rna_array.cc.
References ItemConvert_FuncArg::arg, data, ItemConvert_FuncArg::func, and ptr.
Referenced by copy_values(), and py_to_array_index().
|
static |
Definition at line 445 of file bpy_rna_array.cc.
References MatrixObject::col_num, copy_value_single(), copy_values(), data, float, MatrixObject_Check, ptr, RNA_property_array_dimension(), and MatrixObject::row_num.
Referenced by copy_values(), py_to_array(), and py_to_array_index().
Definition at line 215 of file bpy_rna_array.cc.
References count_items().
Referenced by count_items(), and validate_array_length().
|
static |
Definition at line 701 of file bpy_rna_array.cc.
References ptr, and RNA_property_float_set_index().
Referenced by pyrna_py_to_array_index().
|
static |
Definition at line 706 of file bpy_rna_array.cc.
References ptr, and RNA_property_int_set_index().
Referenced by pyrna_py_to_array_index().
|
static |
Definition at line 696 of file bpy_rna_array.cc.
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
|
static |
Definition at line 684 of file bpy_rna_array.cc.
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
|
static |
Definition at line 690 of file bpy_rna_array.cc.
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
|
static |
Definition at line 514 of file bpy_rna_array.cc.
References ParameterDynAlloc::array, ParameterDynAlloc::array_tot, copy_values(), flag, int, MEM_callocN, PROP_DYNAMIC, ptr, RNA_property_flag(), and validate_array().
Referenced by pyrna_py_to_array().
|
static |
Definition at line 593 of file bpy_rna_array.cc.
References copy_value_single(), copy_values(), MAX_ARRAY_DIMENSION, ptr, RNA_property_array_dimension(), RNA_property_identifier(), RNA_struct_identifier(), PointerRNA::type, and validate_array().
Referenced by pyrna_py_to_array_index().
|
static |
Definition at line 679 of file bpy_rna_array.cc.
Referenced by convert_item_init_bool().
|
static |
Definition at line 663 of file bpy_rna_array.cc.
References CLAMP, float, ItemConvertArgData::float_data, and ItemConvertArgData::range.
Referenced by convert_item_init_float().
|
static |
Definition at line 671 of file bpy_rna_array.cc.
References CLAMP, ItemConvertArgData::int_data, and ItemConvertArgData::range.
Referenced by convert_item_init_int().
| int pyrna_array_contains_py | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| PyObject * | value ) |
Definition at line 1000 of file bpy_rna_array.cc.
References len, PROP_BOOLEAN, PROP_FLOAT, PROP_INT, ptr, PyC_Long_AsBool(), RNA_property_array_dimension(), RNA_property_array_length(), RNA_property_boolean_get_array(), RNA_property_float_get_array(), RNA_property_int_get_array(), and RNA_property_type().
Referenced by pyrna_prop_array_contains().
| PyObject * pyrna_array_index | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index ) |
Definition at line 875 of file bpy_rna_array.cc.
References PROP_BOOLEAN, PROP_FLOAT, PROP_INT, ptr, RNA_property_boolean_get_index(), RNA_property_float_get_index(), RNA_property_int_get_index(), and RNA_property_type().
Referenced by pyrna_driver_get_variable_value(), pyrna_py_from_array_index(), and pyrna_struct_path_resolve().
| PyObject * pyrna_py_from_array | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop ) |
Definition at line 986 of file bpy_rna_array.cc.
References ptr, pyrna_math_object_from_array(), pyrna_prop_CreatePyObject(), and ret.
Referenced by pyrna_prop_to_py().
| PyObject * pyrna_py_from_array_index | ( | BPy_PropertyArrayRNA * | self, |
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | index ) |
Definition at line 937 of file bpy_rna_array.cc.
References BPy_PropertyArrayRNA::arraydim, BPY_LOG_RNA, CLOG_WARN, len, MAX_ARRAY_DIMENSION, ptr, pyrna_array_index(), pyrna_prop_CreatePyObject(), ret, RNA_property_array_dimension(), RNA_property_multi_array_length(), and self.
Referenced by pyrna_prop_array_to_py_index().
| int pyrna_py_to_array | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| char * | param_data, | ||
| PyObject * | py, | ||
| const char * | error_prefix ) |
Definition at line 741 of file bpy_rna_array.cc.
References convert_item_init_bool(), convert_item_init_float(), convert_item_init_int(), PROP_BOOLEAN, PROP_FLOAT, PROP_INT, ptr, py_bool_check(), py_float_check(), py_int_check(), py_to_array(), ret, RNA_property_boolean_set_array(), RNA_property_float_set_array(), RNA_property_int_set_array(), and RNA_property_type().
Referenced by pyrna_py_to_prop().
| int pyrna_py_to_array_index | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | arraydim, | ||
| int | arrayoffset, | ||
| int | index, | ||
| PyObject * | py, | ||
| const char * | error_prefix ) |
Definition at line 804 of file bpy_rna_array.cc.
References bool_set_index(), convert_item_init_bool(), convert_item_init_float(), convert_item_init_int(), float_set_index(), int_set_index(), PROP_BOOLEAN, PROP_FLOAT, PROP_INT, ptr, py_bool_check(), py_float_check(), py_int_check(), py_to_array_index(), ret, and RNA_property_type().
Referenced by pyrna_py_to_prop_array_index().
|
static |
Definition at line 337 of file bpy_rna_array.cc.
References BaseMath_ReadCallback, MatrixObject::col_num, MatrixObject_Check, MAX_ARRAY_DIMENSION, PROP_DYNAMIC, PROP_FLOAT, ptr, RNA_property_array_dimension(), RNA_property_flag(), RNA_property_identifier(), RNA_property_type(), RNA_struct_identifier(), MatrixObject::row_num, PointerRNA::type, validate_array_length(), and validate_array_type().
Referenced by py_to_array(), and py_to_array_index().
|
static |
Definition at line 249 of file bpy_rna_array.cc.
References count_items(), len, MAX_ARRAY_DIMENSION, PROP_DYNAMIC, ptr, RNA_property_array_dimension(), RNA_property_array_length(), RNA_property_flag(), RNA_property_identifier(), RNA_struct_identifier(), and PointerRNA::type.
Referenced by validate_array().
|
static |
Definition at line 79 of file bpy_rna_array.cc.
References SNPRINTF, and validate_array_type().
Referenced by validate_array(), and validate_array_type().