|
Blender V4.3
|
Public Attributes | ||
| BPyPropStore * | next | |
| BPyPropStore * | prev | |
| struct { | ||
| PyObject * get_fn | ||
| PyObject * set_fn | ||
| PyObject * update_fn | ||
| union { | ||
| struct { | ||
| PyObject * itemf_fn | ||
| } enum_data | ||
| struct { | ||
| PyObject * poll_fn | ||
| } pointer_data | ||
| struct { | ||
| PyObject * search_fn | ||
| } string_data | ||
| } | ||
| } | py_data | |
Store #PyObject data for a dynamically defined property. Currently this is only used to store call-back functions. Properties that don't use custom callbacks won't allocate this struct.
This struct adds/removes the user-count of each #PyObject it references, it's needed in case the function is removed from the class (unlikely but possible), also when an annotation evaluates to a lambda with Python 3.10 and newer e.g: #86332.
Pointers to this struct are held in:
g_bpy_prop_store_list (borrows the memory) Having a global list means the users can be visited by the GC and cleared on exit.
This list can't be used for freeing as BPyPropStore doesn't hold a PropertyRNA back-pointer, (while it could be supported it would only complicate things).
All RNA properties are freed after Python has been shut-down. At that point Python user counts can't be touched and must have already been dealt with.
Decrementing users is handled by:
Definition at line 122 of file bpy_props.cc.
| struct { ... } BPyPropStore::enum_data |
PROP_ENUM type.
Referenced by bpy_prop_callback_assign_enum(), and bpy_prop_enum_itemf_fn().
| PyObject* BPyPropStore::get_fn |
Wrap: RNA_def_property_*_funcs (depending on type).
Definition at line 131 of file bpy_props.cc.
Referenced by bpy_prop_boolean_array_get_fn(), bpy_prop_boolean_get_fn(), bpy_prop_callback_assign_boolean(), bpy_prop_callback_assign_boolean_array(), bpy_prop_callback_assign_enum(), bpy_prop_callback_assign_float(), bpy_prop_callback_assign_float_array(), bpy_prop_callback_assign_int(), bpy_prop_callback_assign_int_array(), bpy_prop_callback_assign_string(), bpy_prop_enum_get_fn(), bpy_prop_float_array_get_fn(), bpy_prop_float_get_fn(), bpy_prop_int_array_get_fn(), bpy_prop_int_get_fn(), bpy_prop_string_get_fn(), and bpy_prop_string_length_fn().
| PyObject* BPyPropStore::itemf_fn |
Wrap: RNA_def_property_enum_funcs_runtime
Definition at line 141 of file bpy_props.cc.
Referenced by bpy_prop_callback_assign_enum(), and bpy_prop_enum_itemf_fn().
| BPyPropStore* BPyPropStore::next |
Definition at line 123 of file bpy_props.cc.
| struct { ... } BPyPropStore::pointer_data |
PROP_POINTER type.
Referenced by bpy_prop_callback_assign_pointer(), and bpy_prop_pointer_poll_fn().
| PyObject* BPyPropStore::poll_fn |
Wrap: RNA_def_property_poll_runtime
Definition at line 146 of file bpy_props.cc.
Referenced by bpy_prop_callback_assign_pointer(), and bpy_prop_pointer_poll_fn().
| BPyPropStore * BPyPropStore::prev |
Definition at line 123 of file bpy_props.cc.
| struct { ... } BPyPropStore::py_data |
Only store #PyObject types, so this member can be cast to an array and iterated over. nullptr members are skipped.
Referenced by bpy_prop_boolean_array_get_fn(), bpy_prop_boolean_array_set_fn(), bpy_prop_boolean_get_fn(), bpy_prop_boolean_set_fn(), bpy_prop_callback_assign_boolean(), bpy_prop_callback_assign_boolean_array(), bpy_prop_callback_assign_enum(), bpy_prop_callback_assign_float(), bpy_prop_callback_assign_float_array(), bpy_prop_callback_assign_int(), bpy_prop_callback_assign_int_array(), bpy_prop_callback_assign_pointer(), bpy_prop_callback_assign_string(), bpy_prop_callback_assign_update(), bpy_prop_enum_get_fn(), bpy_prop_enum_itemf_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_py_data_remove(), bpy_prop_string_get_fn(), bpy_prop_string_length_fn(), bpy_prop_string_set_fn(), bpy_prop_string_visit_for_search_fn(), and bpy_prop_update_fn().
| PyObject* BPyPropStore::search_fn |
Wrap: RNA_def_property_string_search_func_runtime
Definition at line 151 of file bpy_props.cc.
Referenced by bpy_prop_callback_assign_string(), and bpy_prop_string_visit_for_search_fn().
| PyObject* BPyPropStore::set_fn |
Definition at line 132 of file bpy_props.cc.
Referenced by bpy_prop_boolean_array_set_fn(), bpy_prop_boolean_set_fn(), bpy_prop_callback_assign_boolean(), bpy_prop_callback_assign_boolean_array(), bpy_prop_callback_assign_enum(), bpy_prop_callback_assign_float(), bpy_prop_callback_assign_float_array(), bpy_prop_callback_assign_int(), bpy_prop_callback_assign_int_array(), bpy_prop_callback_assign_string(), bpy_prop_enum_set_fn(), bpy_prop_float_array_set_fn(), bpy_prop_float_set_fn(), bpy_prop_int_array_set_fn(), bpy_prop_int_set_fn(), and bpy_prop_string_set_fn().
| struct { ... } BPyPropStore::string_data |
PROP_STRING type.
Referenced by bpy_prop_callback_assign_string(), and bpy_prop_string_visit_for_search_fn().
| PyObject* BPyPropStore::update_fn |
Wrap: RNA_def_property_update_runtime
Definition at line 134 of file bpy_props.cc.
Referenced by bpy_prop_callback_assign_update(), and bpy_prop_update_fn().