|
Blender
V2.59
|
#include <Python.h>#include "RNA_types.h"#include "bpy_rna.h"#include "BKE_global.h"#include "MEM_guardedalloc.h"#include "RNA_access.h"Go to the source code of this file.
Defines | |
| #define | MAX_ARRAY_DIMENSION 10 |
Typedefs | |
| typedef void(* | ItemConvertFunc )(PyObject *, char *) |
| typedef int(* | ItemTypeCheckFunc )(PyObject *) |
| typedef void(* | RNA_SetArrayFunc )(PointerRNA *, PropertyRNA *, const char *) |
| typedef void(* | RNA_SetIndexFunc )(PointerRNA *, PropertyRNA *, int index, void *) |
Functions | |
| static int | validate_array_type (PyObject *seq, int dim, int totdim, int dimsize[], 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, int lvalue_dim, int *totitem, const char *error_prefix) |
| static int | validate_array (PyObject *rvalue, PointerRNA *ptr, PropertyRNA *prop, int lvalue_dim, ItemTypeCheckFunc check_item_type, const char *item_type_str, int *totitem, const char *error_prefix) |
| static char * | copy_value_single (PyObject *item, PointerRNA *ptr, PropertyRNA *prop, char *data, unsigned int item_size, int *index, ItemConvertFunc convert_item, RNA_SetIndexFunc rna_set_index) |
| static char * | copy_values (PyObject *seq, PointerRNA *ptr, PropertyRNA *prop, int dim, char *data, unsigned int item_size, int *index, ItemConvertFunc 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, ItemConvertFunc 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, ItemConvertFunc convert_item, RNA_SetIndexFunc rna_set_index, const char *error_prefix) |
| static void | py_to_float (PyObject *py, char *data) |
| static void | py_to_int (PyObject *py, char *data) |
| static void | py_to_bool (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) |
| 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) |
Definition in file bpy_rna_array.c.
| #define MAX_ARRAY_DIMENSION 10 |
Definition at line 39 of file bpy_rna_array.c.
Referenced by py_to_array_index(), pyrna_py_from_array_index(), validate_array(), and validate_array_length().
| typedef void(* ItemConvertFunc)(PyObject *, char *) |
Definition at line 41 of file bpy_rna_array.c.
| typedef int(* ItemTypeCheckFunc)(PyObject *) |
Definition at line 42 of file bpy_rna_array.c.
| typedef void(* RNA_SetArrayFunc)(PointerRNA *, PropertyRNA *, const char *) |
Definition at line 43 of file bpy_rna_array.c.
| typedef void(* RNA_SetIndexFunc)(PointerRNA *, PropertyRNA *, int index, void *) |
Definition at line 44 of file bpy_rna_array.c.
| static void bool_set_index | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index, | ||
| void * | value | ||
| ) | [static] |
Definition at line 463 of file bpy_rna_array.c.
References RNA_property_boolean_set_index().
Referenced by pyrna_py_to_array_index().
| static char* copy_value_single | ( | PyObject * | item, |
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| char * | data, | ||
| unsigned int | item_size, | ||
| int * | index, | ||
| ItemConvertFunc | convert_item, | ||
| RNA_SetIndexFunc | rna_set_index | ||
| ) | [static] |
Definition at line 265 of file bpy_rna_array.c.
Referenced by copy_values(), and py_to_array_index().
| static char* copy_values | ( | PyObject * | seq, |
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | dim, | ||
| char * | data, | ||
| unsigned int | item_size, | ||
| int * | index, | ||
| ItemConvertFunc | convert_item, | ||
| RNA_SetIndexFunc | rna_set_index | ||
| ) | [static] |
Definition at line 282 of file bpy_rna_array.c.
References copy_value_single(), i, NULL, and RNA_property_array_dimension().
Referenced by py_to_array(), and py_to_array_index().
| static int count_items | ( | PyObject * | seq, |
| int | dim | ||
| ) | [static] |
Definition at line 145 of file bpy_rna_array.c.
References i.
Referenced by validate_array_length().
| static void float_set_index | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index, | ||
| void * | value | ||
| ) | [static] |
Definition at line 453 of file bpy_rna_array.c.
References RNA_property_float_set_index().
Referenced by pyrna_py_to_array_index().
| static void int_set_index | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| int | index, | ||
| void * | value | ||
| ) | [static] |
Definition at line 458 of file bpy_rna_array.c.
References RNA_property_int_set_index().
Referenced by pyrna_py_to_array_index().
| static int py_bool_check | ( | PyObject * | py | ) | [static] |
Definition at line 448 of file bpy_rna_array.c.
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
| static int py_float_check | ( | PyObject * | py | ) | [static] |
Definition at line 436 of file bpy_rna_array.c.
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
| static int py_int_check | ( | PyObject * | py | ) | [static] |
Definition at line 442 of file bpy_rna_array.c.
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_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, | ||
| ItemConvertFunc | convert_item, | ||
| RNA_SetArrayFunc | rna_set_array, | ||
| const char * | error_prefix | ||
| ) | [static] |
Definition at line 323 of file bpy_rna_array.c.
References ParameterDynAlloc::array, ParameterDynAlloc::array_tot, copy_values(), MEM_callocN(), NULL, PROP_DYNAMIC, RNA_property_flag(), and validate_array().
Referenced by pyrna_py_to_array().
| 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, | ||
| ItemConvertFunc | convert_item, | ||
| RNA_SetIndexFunc | rna_set_index, | ||
| const char * | error_prefix | ||
| ) | [static] |
Definition at line 375 of file bpy_rna_array.c.
References copy_value_single(), copy_values(), i, MAX_ARRAY_DIMENSION, NULL, RNA_property_array_dimension(), RNA_property_identifier(), RNA_struct_identifier(), PointerRNA::type, and validate_array().
Referenced by pyrna_py_to_array_index().
| static void py_to_bool | ( | PyObject * | py, |
| char * | data | ||
| ) | [static] |
Definition at line 431 of file bpy_rna_array.c.
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
| static void py_to_float | ( | PyObject * | py, |
| char * | data | ||
| ) | [static] |
Definition at line 421 of file bpy_rna_array.c.
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
| static void py_to_int | ( | PyObject * | py, |
| char * | data | ||
| ) | [static] |
Definition at line 426 of file bpy_rna_array.c.
Referenced by pyrna_py_to_array(), and pyrna_py_to_array_index().
| int pyrna_array_contains_py | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop, | ||
| PyObject * | value | ||
| ) |
Definition at line 625 of file bpy_rna_array.c.
References i, NULL, PROP_BOOLEAN, PROP_FLOAT, PROP_INT, 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 510 of file bpy_rna_array.c.
References NULL, PROP_BOOLEAN, PROP_FLOAT, PROP_INT, RNA_property_boolean_get_index(), RNA_property_float_get_index(), RNA_property_int_get_index(), and RNA_property_type().
Referenced by pyrna_py_from_array_index(), and pyrna_struct_path_resolve().
| PyObject* pyrna_py_from_array | ( | PointerRNA * | ptr, |
| PropertyRNA * | prop | ||
| ) |
Definition at line 612 of file bpy_rna_array.c.
References pyrna_math_object_from_array(), and pyrna_prop_CreatePyObject().
Referenced by pyrna_prop_to_py().
| PyObject* pyrna_py_from_array_index | ( | BPy_PropertyArrayRNA * | self, |
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | index | ||
| ) |
Definition at line 567 of file bpy_rna_array.c.
References BPy_PropertyArrayRNA::arraydim, BPy_PropertyArrayRNA::arrayoffset, Global::f, G, G_DEBUG, i, MAX_ARRAY_DIMENSION, NULL, pyrna_array_index(), pyrna_prop_CreatePyObject(), RNA_property_array_dimension(), and RNA_property_multi_array_length().
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 468 of file bpy_rna_array.c.
References PROP_BOOLEAN, PROP_FLOAT, PROP_INT, py_bool_check(), py_float_check(), py_int_check(), py_to_array(), py_to_bool(), py_to_float(), py_to_int(), 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 489 of file bpy_rna_array.c.
References bool_set_index(), float_set_index(), int_set_index(), PROP_BOOLEAN, PROP_FLOAT, PROP_INT, py_bool_check(), py_float_check(), py_int_check(), py_to_array_index(), py_to_bool(), py_to_float(), py_to_int(), and RNA_property_type().
Referenced by pyrna_py_to_prop_array_index().
| static int validate_array | ( | PyObject * | rvalue, |
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | lvalue_dim, | ||
| ItemTypeCheckFunc | check_item_type, | ||
| const char * | item_type_str, | ||
| int * | totitem, | ||
| const char * | error_prefix | ||
| ) | [static] |
Definition at line 252 of file bpy_rna_array.c.
References MAX_ARRAY_DIMENSION, RNA_property_array_dimension(), validate_array_length(), and validate_array_type().
Referenced by py_to_array(), and py_to_array_index().
| static int validate_array_length | ( | PyObject * | rvalue, |
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | lvalue_dim, | ||
| int * | totitem, | ||
| const char * | error_prefix | ||
| ) | [static] |
Definition at line 179 of file bpy_rna_array.c.
References count_items(), i, MAX_ARRAY_DIMENSION, PROP_DYNAMIC, 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 int validate_array_type | ( | PyObject * | seq, |
| int | dim, | ||
| int | totdim, | ||
| int | dimsize[], | ||
| ItemTypeCheckFunc | check_item_type, | ||
| const char * | item_type_str, | ||
| const char * | error_prefix | ||
| ) | [static] |
Definition at line 61 of file bpy_rna_array.c.
Referenced by validate_array().