Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | BPy_DummyPointerRNA |
struct | BPy_StructRNA |
struct | BPy_PropertyRNA |
struct | BPy_PropertyArrayRNA |
struct | BPy_PropertyCollectionIterRNA |
struct | BPy_FunctionRNA |
struct | BPy_StructRNA_Parse |
Macros | |
#define | USE_PYRNA_ITER |
#define | BPy_StructRNA_Check(v) (PyObject_TypeCheck(v, &pyrna_struct_Type)) |
#define | BPy_StructRNA_CheckExact(v) (Py_TYPE(v) == &pyrna_struct_Type) |
#define | BPy_PropertyRNA_Check(v) (PyObject_TypeCheck(v, &pyrna_prop_Type)) |
#define | BPy_PropertyRNA_CheckExact(v) (Py_TYPE(v) == &pyrna_prop_Type) |
#define | PYRNA_STRUCT_CHECK_OBJ(obj) |
#define | PYRNA_STRUCT_CHECK_INT(obj) |
#define | PYRNA_PROP_CHECK_OBJ(obj) |
#define | PYRNA_PROP_CHECK_INT(obj) |
#define | PYRNA_STRUCT_IS_VALID(pysrna) (LIKELY(((BPy_StructRNA *)(pysrna))->ptr.type != NULL)) |
#define | PYRNA_PROP_IS_VALID(pysrna) (LIKELY(((BPy_PropertyRNA *)(pysrna))->ptr.type != NULL)) |
Variables | |
PyTypeObject | pyrna_struct_meta_idprop_Type |
PyTypeObject | pyrna_struct_Type |
PyTypeObject | pyrna_prop_Type |
PyTypeObject | pyrna_prop_array_Type |
PyTypeObject | pyrna_prop_collection_Type |
PyTypeObject | pyrna_func_Type |
PyMethodDef | meth_bpy_register_class |
PyMethodDef | meth_bpy_unregister_class |
PyMethodDef | meth_bpy_owner_id_set |
PyMethodDef | meth_bpy_owner_id_get |
BPy_StructRNA * | bpy_context_module |
#define BPy_PropertyRNA_Check | ( | v | ) | (PyObject_TypeCheck(v, &pyrna_prop_Type)) |
#define BPy_PropertyRNA_CheckExact | ( | v | ) | (Py_TYPE(v) == &pyrna_prop_Type) |
#define BPy_StructRNA_Check | ( | v | ) | (PyObject_TypeCheck(v, &pyrna_struct_Type)) |
#define BPy_StructRNA_CheckExact | ( | v | ) | (Py_TYPE(v) == &pyrna_struct_Type) |
#define PYRNA_PROP_CHECK_INT | ( | obj | ) |
#define PYRNA_PROP_IS_VALID | ( | pysrna | ) | (LIKELY(((BPy_PropertyRNA *)(pysrna))->ptr.type != NULL)) |
#define PYRNA_STRUCT_CHECK_INT | ( | obj | ) |
#define PYRNA_STRUCT_CHECK_OBJ | ( | obj | ) |
#define PYRNA_STRUCT_IS_VALID | ( | pysrna | ) | (LIKELY(((BPy_StructRNA *)(pysrna))->ptr.type != NULL)) |
Definition at line 7726 of file bpy_rna.c.
References BLI_ghash_free(), BLI_ghash_len(), BLI_ghashIterator_getKey(), GHASH_ITER, id, ID::name, and NULL.
Referenced by BPY_python_end().
Definition at line 7673 of file bpy_rna.c.
References BLI_assert, BLI_ghash_ptr_new(), Mathutils_RegisterCallback(), mathutils_rna_array_cb, mathutils_rna_array_cb_index, mathutils_rna_matrix_cb, mathutils_rna_matrix_cb_index, NULL, pyrna_func_Type, pyrna_prop_array_Type, pyrna_prop_collection_idprop_Type, pyrna_prop_collection_iter_Type, pyrna_prop_collection_Type, pyrna_prop_Type, pyrna_struct_meta_idprop_Type, and pyrna_struct_Type.
Referenced by BPY_python_start().
PyObject* BPY_rna_module | ( | void | ) |
Definition at line 7749 of file bpy_rna.c.
References G_MAIN, BPy_StructRNA::ptr, ptr, pyrna_struct_CreatePyObject(), RNA_main_pointer_create(), and rna_module_ptr.
Referenced by BPy_init_modules(), and BPY_modules_update().
PyObject* BPY_rna_types | ( | void | ) |
Definition at line 7877 of file bpy_rna.c.
References ARRAY_SIZE, bpy_types_module_def, pyrna_func_Type, pyrna_prop_array_Type, pyrna_prop_collection_Type, pyrna_prop_Type, pyrna_struct_meta_idprop_Type, pyrna_struct_Type, RNA_blender_rna_pointer_create(), RNA_struct_find_property(), and state.
Referenced by BPy_init_modules(), and BPY_modules_update().
Definition at line 7762 of file bpy_rna.c.
References PointerRNA::data, G_MAIN, RNA_main_pointer_create(), and rna_module_ptr.
Referenced by BPY_driver_exec(), and BPY_modules_update().
Definition at line 8853 of file bpy_rna.c.
References NULL, ptr, pyrna_struct_Subtype(), RNA_blender_rna_pointer_create(), RNA_PROP_BEGIN, RNA_PROP_END, and RNA_struct_find_property().
Referenced by BPY_python_start().
int pyrna_array_contains_py | ( | PointerRNA * | ptr, |
PropertyRNA * | prop, | ||
PyObject * | value | ||
) |
Definition at line 979 of file bpy_rna_array.c.
References len, NULL, 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(), RNA_property_type(), and type.
Referenced by pyrna_prop_array_contains().
PyObject* pyrna_array_index | ( | PointerRNA * | ptr, |
PropertyRNA * | prop, | ||
int | index | ||
) |
Definition at line 854 of file bpy_rna_array.c.
References NULL, 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().
int pyrna_deferred_register_class | ( | struct StructRNA * | srna, |
PyTypeObject * | py_class | ||
) |
Definition at line 8230 of file bpy_rna.c.
References pyrna_deferred_register_class_from_type_hints(), pyrna_deferred_register_class_recursive(), and RNA_struct_idprops_register_check().
Referenced by gizmo_properties_init(), gizmogroup_properties_init(), operator_properties_init(), and pyrna_register_class().
Definition at line 8885 of file bpy_rna.c.
References bpy_class_free(), NULL, ptr, RNA_blender_rna_pointer_create(), RNA_PROP_BEGIN, RNA_PROP_END, RNA_struct_find_property(), RNA_struct_py_type_get(), RNA_struct_py_type_set(), and srna_from_ptr().
Referenced by BPY_python_end().
bool pyrna_id_CheckPyObject | ( | PyObject * | obj | ) |
Definition at line 7668 of file bpy_rna.c.
Referenced by pyrna_id_FromPyObject().
void pyrna_invalidate | ( | BPy_DummyPointerRNA * | self | ) |
Definition at line 123 of file bpy_rna.c.
References RNA_POINTER_INVALIDATE, and self.
Referenced by BPY_DECREF_RNA_INVALIDATE().
PyObject* pyrna_math_object_from_array | ( | PointerRNA * | ptr, |
PropertyRNA * | prop | ||
) |
Definition at line 626 of file bpy_rna.c.
References col, Color_CreatePyObject(), Color_CreatePyObject_cb(), Euler_CreatePyObject(), Euler_CreatePyObject_cb(), EULER_ORDER_XYZ, GHash::flag, len, MATHUTILS_CB_SUBTYPE_COLOR, MATHUTILS_CB_SUBTYPE_EUL, MATHUTILS_CB_SUBTYPE_QUAT, MATHUTILS_CB_SUBTYPE_VEC, mathutils_rna_array_cb_index, mathutils_rna_matrix_cb_index, Matrix_CreatePyObject(), Matrix_CreatePyObject_cb(), NULL, order, PROP_ALL_VECTOR_SUBTYPES, PROP_COLOR, PROP_COLOR_GAMMA, PROP_DYNAMIC, PROP_EULER, PROP_FLOAT, PROP_INT, PROP_MATRIX, PROP_QUATERNION, PROP_THICK_WRAP, ptr, pyrna_prop_array_subscript_slice(), pyrna_prop_CreatePyObject(), pyrna_rotation_euler_order_get(), Quaternion_CreatePyObject(), Quaternion_CreatePyObject_cb(), ret, RNA_property_array_dimension(), RNA_property_array_length(), RNA_property_flag(), RNA_property_float_get_array(), RNA_property_subtype(), RNA_property_type(), type, Vector_CreatePyObject(), Vector_CreatePyObject_cb(), and void.
Referenced by pyrna_py_from_array().
PyObject* pyrna_prop_CreatePyObject | ( | PointerRNA * | ptr, |
PropertyRNA * | prop | ||
) |
Definition at line 7596 of file bpy_rna.c.
References NULL, PointerRNA::owner_id, BPy_PropertyRNA::prop, PROP_COLLECTION, PROP_IDPROPERTY, BPy_PropertyRNA::ptr, ptr, pyrna_prop_array_Type, pyrna_prop_collection_idprop_Type, pyrna_prop_collection_Type, pyrna_prop_Type, RNA_property_array_check(), RNA_property_flag(), RNA_property_type(), and type.
Referenced by pyrna_math_object_from_array(), pyrna_prop_to_py(), pyrna_py_from_array(), pyrna_py_from_array_index(), and pyrna_struct_path_resolve().
PyObject* pyrna_prop_to_py | ( | PointerRNA * | ptr, |
PropertyRNA * | prop | ||
) |
Definition at line 1372 of file bpy_rna.c.
References PointerRNA::data, ELEM, MEM_freeN, NULL, PROP_BOOLEAN, PROP_BYTESTRING, PROP_COLLECTION, PROP_DIRPATH, PROP_ENUM, PROP_FILENAME, PROP_FILEPATH, PROP_FLOAT, PROP_INT, PROP_POINTER, PROP_STRING, ptr, PyC_UnicodeFromByteAndSize(), pyrna_enum_to_py(), pyrna_prop_CreatePyObject(), pyrna_py_from_array(), pyrna_struct_CreatePyObject(), ret, RNA_property_array_check(), RNA_property_boolean_get(), RNA_property_enum_get(), RNA_property_float_get(), RNA_property_int_get(), RNA_property_pointer_get(), RNA_property_string_get_alloc(), RNA_property_subtype(), RNA_property_type(), and type.
Referenced by pyrna_driver_get_variable_value(), pyrna_prop_collection_getattro(), pyrna_struct_getattro(), and pyrna_struct_path_resolve().
int pyrna_prop_validity_check | ( | BPy_PropertyRNA * | self | ) |
Definition at line 111 of file bpy_rna.c.
References RNA_property_identifier(), and self.
PyObject* pyrna_py_from_array | ( | PointerRNA * | ptr, |
PropertyRNA * | prop | ||
) |
Definition at line 965 of file bpy_rna_array.c.
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 916 of file bpy_rna_array.c.
References BPY_LOG_RNA, CLOG_WARN, len, MAX_ARRAY_DIMENSION, NULL, ptr, pyrna_array_index(), pyrna_prop_CreatePyObject(), ret, 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 720 of file bpy_rna_array.c.
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 783 of file bpy_rna_array.c.
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().
int pyrna_pydict_to_props | ( | PointerRNA * | ptr, |
PyObject * | kw, | ||
bool | all_args, | ||
const char * | error_prefix | ||
) |
Definition at line 1453 of file bpy_rna.c.
References NULL, pos, ptr, pyrna_py_to_prop(), RNA_property_identifier(), RNA_STRUCT_BEGIN, RNA_STRUCT_END, RNA_struct_find_property(), and STREQ.
Referenced by pyop_as_string(), pyop_call(), and pyrna_py_to_prop().
const PointerRNA* pyrna_struct_as_ptr | ( | PyObject * | py_obj, |
const StructRNA * | srna | ||
) |
Definition at line 7960 of file bpy_rna.c.
References BPy_StructRNA_Check, NULL, BPy_StructRNA::ptr, PYRNA_STRUCT_CHECK_OBJ, RNA_struct_identifier(), RNA_struct_is_a(), and PointerRNA::type.
Referenced by bpy_context_temp_override(), pyrna_struct_as_ptr_or_null(), and pyrna_struct_as_ptr_parse().
const PointerRNA* pyrna_struct_as_ptr_or_null | ( | PyObject * | py_obj, |
const StructRNA * | srna | ||
) |
Definition at line 7974 of file bpy_rna.c.
References PointerRNA_NULL, and pyrna_struct_as_ptr().
Referenced by pyrna_struct_as_ptr_or_null_parse().
int pyrna_struct_as_ptr_or_null_parse | ( | PyObject * | o, |
void * | p | ||
) |
A version of pyrna_struct_as_ptr_parse that maps Python's None
to PointerRNA_NULL.
Definition at line 7993 of file bpy_rna.c.
References BLI_assert, NULL, BPy_StructRNA_Parse::ptr, pyrna_struct_as_ptr_or_null(), and BPy_StructRNA_Parse::type.
Referenced by bpy_context_temp_override().
int pyrna_struct_as_ptr_parse | ( | PyObject * | o, |
void * | p | ||
) |
Sets BPy_StructRNA_Parse.ptr to the value in the BPy_StructRNA.ptr (from o
) or raise an error if the type isn't a BPy_StructRNA.
Use with #PyArg_ParseTuple's O&
formatting.
Definition at line 7982 of file bpy_rna.c.
References BLI_assert, NULL, BPy_StructRNA_Parse::ptr, pyrna_struct_as_ptr(), and BPy_StructRNA_Parse::type.
Definition at line 7907 of file bpy_rna.c.
References bpy_intern_str_bl_rna, BPy_StructRNA_Check, PointerRNA::data, NULL, BPy_StructRNA::ptr, and PointerRNA::type.
Referenced by py_msgbus_rna_key_from_py(), PYOP_wrap_macro_define(), pyrna_callback_classmethod_add(), pyrna_callback_classmethod_remove(), pyrna_register_class(), pyrna_unregister_class(), and srna_from_self().
PyObject* pyrna_struct_CreatePyObject | ( | PointerRNA * | ptr | ) |
Definition at line 7505 of file bpy_rna.c.
References BPY_LOG_RNA, CLOG_WARN, PointerRNA::data, instance, NULL, PointerRNA::owner_id, BPy_StructRNA::ptr, ptr, pyrna_struct_Subtype(), pyrna_struct_Type, RNA_struct_identifier(), RNA_struct_instance(), and PointerRNA::type.
Referenced by bpy_app_generic_callback(), bpy_class_call(), BPy_init_modules(), bpy_lib_exit_lapp_context_items_cb(), bpy_pydriver_depsgraph_as_pyobject(), bpy_rna_data_context_enter(), bpy_rna_enum_items_static(), BPY_rna_module(), bpy_utils_previews_load(), bpy_utils_previews_new(), Freestyle_getCurrentScene(), pyop_getrna_type(), PYOP_wrap_macro_define(), pyrna_driver_get_variable_value(), pyrna_driver_self_from_anim_rna(), pyrna_id_CreatePyObject(), pyrna_param_to_py(), pyrna_prop_collection_get(), pyrna_prop_collection_getattro(), pyrna_prop_collection_idprop_add(), pyrna_prop_collection_items(), pyrna_prop_collection_iter_next(), pyrna_prop_collection_subscript_int(), pyrna_prop_collection_subscript_slice(), pyrna_prop_collection_subscript_str(), pyrna_prop_collection_subscript_str_lib_pair(), pyrna_prop_to_py(), pyrna_py_to_prop(), pyrna_struct_as_instance(), pyrna_struct_bl_rna_get_subclass(), pyrna_struct_driver_add(), pyrna_struct_get_data(), pyrna_struct_get_id_data(), pyrna_struct_getattro(), pyrna_struct_path_resolve(), pyrna_struct_type_recast(), and pyrna_subtype_set_rna().
void pyrna_struct_type_extend_capi | ( | struct StructRNA * | srna, |
struct PyMethodDef * | py_method, | ||
struct PyGetSetDef * | py_getset | ||
) |
Definition at line 9228 of file bpy_rna.c.
References BLI_assert, err, NULL, pyrna_srna_Subtype(), type, and UNUSED_VARS_NDEBUG.
Referenced by BPY_rna_types_extend_capi().
int pyrna_struct_validity_check | ( | BPy_StructRNA * | pysrna | ) |
Definition at line 101 of file bpy_rna.c.
References BPy_StructRNA::ptr, and PointerRNA::type.
Referenced by pyrna_py_to_prop().
Definition at line 344 of file bpy_rna.c.
References rna_disallow_writes.
Referenced by bpy_msgbus_notify(), bpy_prop_boolean_array_get_fn(), bpy_prop_boolean_array_set_fn(), bpy_prop_boolean_get_fn(), bpy_prop_boolean_set_fn(), bpy_prop_enum_get_fn(), bpy_prop_enum_set_fn(), bpy_prop_float_array_get_fn(), bpy_prop_float_array_set_fn(), bpy_prop_float_get_fn(), bpy_prop_float_set_fn(), bpy_prop_int_array_get_fn(), bpy_prop_int_array_set_fn(), bpy_prop_int_get_fn(), bpy_prop_int_set_fn(), bpy_prop_pointer_poll_fn(), bpy_prop_string_get_fn(), bpy_prop_string_length_fn(), bpy_prop_string_set_fn(), bpy_prop_update_fn(), pyop_call(), pyrna_register_class(), pyrna_struct_meta_idprop_setattro(), and pyrna_unregister_class().
Definition at line 349 of file bpy_rna.c.
References rna_disallow_writes.
Referenced by bpy_msgbus_notify(), bpy_prop_boolean_array_get_fn(), bpy_prop_boolean_array_set_fn(), bpy_prop_boolean_get_fn(), bpy_prop_boolean_set_fn(), bpy_prop_enum_get_fn(), bpy_prop_enum_set_fn(), bpy_prop_float_array_get_fn(), bpy_prop_float_array_set_fn(), bpy_prop_float_get_fn(), bpy_prop_float_set_fn(), bpy_prop_int_array_get_fn(), bpy_prop_int_array_set_fn(), bpy_prop_int_get_fn(), bpy_prop_int_set_fn(), bpy_prop_pointer_poll_fn(), bpy_prop_string_get_fn(), bpy_prop_string_length_fn(), bpy_prop_string_set_fn(), and bpy_prop_update_fn().
StructRNA* srna_from_self | ( | PyObject * | self, |
const char * | error_prefix | ||
) |
Definition at line 8005 of file bpy_rna.c.
References NULL, and pyrna_struct_as_srna().
Referenced by bpy_prop_deferred_data_or_srna(), BPy_RemoveProperty(), deferred_register_prop(), pointer_type_from_py(), and pyrna_struct_meta_idprop_setattro().
|
extern |
Definition at line 87 of file bpy_rna.c.
Referenced by BPY_context_get(), BPY_context_set(), BPy_init_modules(), bpy_prop_enum_itemf_fn(), bpy_prop_string_visit_for_search_fn(), and bpy_prop_update_fn().
|
extern |
Definition at line 9301 of file bpy_rna.c.
Referenced by BPy_init_modules().
|
extern |
Definition at line 9307 of file bpy_rna.c.
Referenced by BPy_init_modules().
|
extern |
Definition at line 8937 of file bpy_rna.c.
Referenced by BPy_init_modules().
|
extern |
Definition at line 9111 of file bpy_rna.c.
Referenced by BPy_init_modules().
|
extern |
Definition at line 7003 of file bpy_rna.c.
Referenced by BPY_rna_init(), BPY_rna_types(), and pyrna_func_to_py().
|
extern |
Definition at line 6748 of file bpy_rna.c.
Referenced by BPY_rna_init(), BPY_rna_types(), and pyrna_prop_CreatePyObject().
|
extern |
Definition at line 6831 of file bpy_rna.c.
Referenced by BPY_rna_init(), BPY_rna_types(), pyrna_prop_CreatePyObject(), and pyrna_py_to_prop().
|
extern |
Definition at line 6664 of file bpy_rna.c.
Referenced by BPY_rna_init(), BPY_rna_types(), pyrna_prop_CreatePyObject(), and pyrna_prop_new().
|
extern |
Definition at line 6487 of file bpy_rna.c.
Referenced by BPY_rna_init(), BPY_rna_types(), and pyrna_srna_Subtype().
|
extern |
Definition at line 6571 of file bpy_rna.c.
Referenced by BPY_rna_init(), BPY_rna_types(), Freestyle_evaluateColorRamp(), Freestyle_evaluateCurveMappingF(), pyrna_deferred_register_class_recursive(), pyrna_srna_PyBase(), pyrna_struct_CreatePyObject(), and pyrna_struct_new().