|
Blender
V2.93
|
Go to the source code of this file.
Classes | |
| struct | PyC_FlagSet |
| struct | PyC_StringEnumItems |
| struct | PyC_StringEnum |
Macros | |
| #define | PyC_Tuple_Pack_F32(...) PyC_Tuple_PackArray_F32(((const float[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
| #define | PyC_Tuple_Pack_F64(...) PyC_Tuple_PackArray_F64(((const double[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
| #define | PyC_Tuple_Pack_I32(...) PyC_Tuple_PackArray_I32(((const int[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
| #define | PyC_Tuple_Pack_I32FromBool(...) PyC_Tuple_PackArray_I32FromBool(((const int[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
| #define | PyC_Tuple_Pack_Bool(...) PyC_Tuple_PackArray_Bool(((const bool[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
Typedefs | |
| typedef struct PyC_FlagSet | PyC_FlagSet |
Functions | |
| void | PyC_ObSpit (const char *name, PyObject *var) |
| void | PyC_ObSpitStr (char *result, size_t result_len, PyObject *var) |
| void | PyC_LineSpit (void) |
| void | PyC_StackSpit (void) |
| PyObject * | PyC_ExceptionBuffer (void) |
| PyObject * | PyC_ExceptionBuffer_Simple (void) |
| PyObject * | PyC_Object_GetAttrStringArgs (PyObject *o, Py_ssize_t n,...) |
| PyObject * | PyC_FrozenSetFromStrings (const char **strings) |
| PyObject * | PyC_Err_Format_Prefix (PyObject *exception_type_prefix, const char *format,...) |
| PyObject * | PyC_Err_SetString_Prefix (PyObject *exception_type_prefix, const char *str) |
| void | PyC_Err_PrintWithFunc (PyObject *py_func) |
| void | PyC_FileAndNum (const char **r_filename, int *r_lineno) |
| void | PyC_FileAndNum_Safe (const char **r_filename, int *r_lineno) |
| int | PyC_AsArray_FAST (void *array, PyObject *value_fast, const Py_ssize_t length, const PyTypeObject *type, const bool is_double, const char *error_prefix) |
| int | PyC_AsArray (void *array, PyObject *value, const Py_ssize_t length, const PyTypeObject *type, const bool is_double, const char *error_prefix) |
| PyObject * | PyC_Tuple_PackArray_F32 (const float *array, uint len) |
| PyObject * | PyC_Tuple_PackArray_F64 (const double *array, uint len) |
| PyObject * | PyC_Tuple_PackArray_I32 (const int *array, uint len) |
| PyObject * | PyC_Tuple_PackArray_I32FromBool (const int *array, uint len) |
| PyObject * | PyC_Tuple_PackArray_Bool (const bool *array, uint len) |
| void | PyC_Tuple_Fill (PyObject *tuple, PyObject *value) |
| void | PyC_List_Fill (PyObject *list, PyObject *value) |
| PyObject * | PyC_UnicodeFromByte (const char *str) |
| PyObject * | PyC_UnicodeFromByteAndSize (const char *str, Py_ssize_t size) |
| const char * | PyC_UnicodeAsByte (PyObject *py_str, PyObject **coerce) |
| const char * | PyC_UnicodeAsByteAndSize (PyObject *py_str, Py_ssize_t *size, PyObject **coerce) |
| PyObject * | PyC_DefaultNameSpace (const char *filename) |
| void | PyC_RunQuicky (const char *filepath, int n,...) |
| bool | PyC_NameSpace_ImportArray (PyObject *py_dict, const char *imports[]) |
| void | PyC_MainModule_Backup (PyObject **r_main_mod) |
| void | PyC_MainModule_Restore (PyObject *main_mod) |
| bool | PyC_IsInterpreterActive (void) |
| void * | PyC_RNA_AsPointer (PyObject *value, const char *type_name) |
| PyObject * | PyC_FlagSet_AsString (PyC_FlagSet *item) |
| int | PyC_FlagSet_ValueFromID_int (PyC_FlagSet *item, const char *identifier, int *r_value) |
| int | PyC_FlagSet_ValueFromID (PyC_FlagSet *item, const char *identifier, int *r_value, const char *error_prefix) |
| int | PyC_FlagSet_ToBitfield (PyC_FlagSet *items, PyObject *value, int *r_value, const char *error_prefix) |
| PyObject * | PyC_FlagSet_FromBitfield (PyC_FlagSet *items, int flag) |
| bool | PyC_RunString_AsNumber (const char **imports, const char *expr, const char *filename, double *r_value) |
| bool | PyC_RunString_AsIntPtr (const char **imports, const char *expr, const char *filename, intptr_t *r_value) |
| bool | PyC_RunString_AsStringAndSize (const char **imports, const char *expr, const char *filename, char **r_value, size_t *r_value_size) |
| bool | PyC_RunString_AsString (const char **imports, const char *expr, const char *filename, char **r_value) |
| int | PyC_ParseBool (PyObject *o, void *p) |
| int | PyC_ParseStringEnum (PyObject *o, void *p) |
| const char * | PyC_StringEnum_FindIDFromValue (const struct PyC_StringEnumItems *items, const int value) |
| int | PyC_CheckArgs_DeepCopy (PyObject *args) |
| int | PyC_Long_AsBool (PyObject *value) |
| int8_t | PyC_Long_AsI8 (PyObject *value) |
| int16_t | PyC_Long_AsI16 (PyObject *value) |
| uint8_t | PyC_Long_AsU8 (PyObject *value) |
| uint16_t | PyC_Long_AsU16 (PyObject *value) |
| uint32_t | PyC_Long_AsU32 (PyObject *value) |
| Py_LOCAL_INLINE (int32_t) PyC_Long_AsI32(PyObject *value) | |
| Py_LOCAL_INLINE (int64_t) PyC_Long_AsI64(PyObject *value) | |
| Py_LOCAL_INLINE (uint64_t) PyC_Long_AsU64(PyObject *value) | |
| char | PyC_StructFmt_type_from_str (const char *typestr) |
| bool | PyC_StructFmt_type_is_float_any (char format) |
| bool | PyC_StructFmt_type_is_int_any (char format) |
| bool | PyC_StructFmt_type_is_byte (char format) |
| bool | PyC_StructFmt_type_is_bool (char format) |
| #define PyC_Tuple_Pack_Bool | ( | ... | ) | PyC_Tuple_PackArray_Bool(((const bool[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
Definition at line 71 of file py_capi_utils.h.
| #define PyC_Tuple_Pack_F32 | ( | ... | ) | PyC_Tuple_PackArray_F32(((const float[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
Definition at line 63 of file py_capi_utils.h.
| #define PyC_Tuple_Pack_F64 | ( | ... | ) | PyC_Tuple_PackArray_F64(((const double[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
Definition at line 65 of file py_capi_utils.h.
| #define PyC_Tuple_Pack_I32 | ( | ... | ) | PyC_Tuple_PackArray_I32(((const int[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
Definition at line 67 of file py_capi_utils.h.
| #define PyC_Tuple_Pack_I32FromBool | ( | ... | ) | PyC_Tuple_PackArray_I32FromBool(((const int[]){__VA_ARGS__}), VA_NARGS_COUNT(__VA_ARGS__)) |
Definition at line 69 of file py_capi_utils.h.
| typedef struct PyC_FlagSet PyC_FlagSet |
| Py_LOCAL_INLINE | ( | int32_t | ) |
Definition at line 165 of file py_capi_utils.h.
References PyC_StringEnumItems::value.
| Py_LOCAL_INLINE | ( | int64_t | ) |
Definition at line 169 of file py_capi_utils.h.
References PyC_StringEnumItems::value.
| Py_LOCAL_INLINE | ( | uint64_t | ) |
Definition at line 173 of file py_capi_utils.h.
References PyC_StringEnumItems::value.
| int PyC_AsArray | ( | void * | array, |
| PyObject * | value, | ||
| const Py_ssize_t | length, | ||
| const PyTypeObject * | type, | ||
| const bool | is_double, | ||
| const char * | error_prefix | ||
| ) |
Definition at line 125 of file py_capi_utils.c.
References length(), PyC_AsArray_FAST(), ret, and type.
Referenced by BPy_BoolVectorProperty(), BPy_FloatVectorProperty(), bpy_gizmo_target_set_value(), BPy_IDArray_ass_slice(), BPy_IntVectorProperty(), bpy_prop_boolean_array_get_fn(), bpy_prop_float_array_get_fn(), bpy_prop_int_array_get_fn(), py_imbuf_ppm_set(), py_rna_gizmo_handler_get_cb(), pygpu_texture__tp_new(), and pygpu_texture_clear().
| int PyC_AsArray_FAST | ( | void * | array, |
| PyObject * | value_fast, | ||
| const Py_ssize_t | length, | ||
| const PyTypeObject * | type, | ||
| const bool | is_double, | ||
| const char * | error_prefix | ||
| ) |
Definition at line 59 of file py_capi_utils.c.
References BLI_assert, length(), and type.
Referenced by PyC_AsArray(), pygpu_IndexBuf__tp_new(), pygpu_shader_uniform_bool(), and pygpu_shader_uniform_int().
| int PyC_CheckArgs_DeepCopy | ( | PyObject * | args | ) |
Definition at line 297 of file py_capi_utils.c.
Referenced by Color_deepcopy(), Euler_deepcopy(), Matrix_deepcopy(), py_imbuf_deepcopy(), Quaternion_deepcopy(), and Vector_deepcopy().
| PyObject* PyC_DefaultNameSpace | ( | const char * | filename | ) |
Definition at line 876 of file py_capi_utils.c.
References PyC_UnicodeFromByte().
Referenced by bpy_rna_uilayout_introspect(), bpy_run_string_impl(), PyC_RunQuicky(), PyC_RunString_AsIntPtr(), PyC_RunString_AsNumber(), PyC_RunString_AsStringAndSize(), and python_script_exec().
| PyObject* PyC_Err_Format_Prefix | ( | PyObject * | exception_type_prefix, |
| const char * | format, | ||
| ... | |||
| ) |
Similar to #PyErr_Format(),
Implementation - we cant actually prepend the existing exception, because it could have any arguments given to it, so instead we get its __str__ output and raise our own exception including it.
Definition at line 530 of file py_capi_utils.c.
References NULL.
Referenced by bpy_class_call(), PyC_Err_SetString_Prefix(), and pyrna_py_to_prop().
| void PyC_Err_PrintWithFunc | ( | PyObject * | py_func | ) |
Use for Python callbacks run directly from C, when we can't use normal methods of raising exceptions.
Definition at line 573 of file py_capi_utils.c.
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_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_string_get_fn(), bpy_prop_string_length_fn(), bpy_prop_string_set_fn(), and bpy_prop_update_fn().
| PyObject* PyC_Err_SetString_Prefix | ( | PyObject * | exception_type_prefix, |
| const char * | str | ||
| ) |
Definition at line 564 of file py_capi_utils.c.
References PyC_Err_Format_Prefix(), and str.
Referenced by bpy_app_debug_value_set().
| PyObject* PyC_ExceptionBuffer | ( | void | ) |
Definition at line 657 of file py_capi_utils.c.
References NULL, and pyc_exception_buffer_handle_system_exit().
Referenced by BPy_errors_to_report_ex(), pointer_type_from_py(), pyrna_py_to_prop(), and run_string_handle_error().
| PyObject* PyC_ExceptionBuffer_Simple | ( | void | ) |
Definition at line 732 of file py_capi_utils.c.
References NULL, pyc_exception_buffer_handle_system_exit(), and UNLIKELY.
Referenced by BPy_errors_to_report_ex(), and run_string_handle_error().
| void PyC_FileAndNum | ( | const char ** | r_filename, |
| int * | r_lineno | ||
| ) |
Definition at line 402 of file py_capi_utils.c.
Referenced by BPy_errors_to_report_ex(), PyC_FileAndNum_Safe(), PyC_LineSpit(), and pyrna_func_call().
| void PyC_FileAndNum_Safe | ( | const char ** | r_filename, |
| int * | r_lineno | ||
| ) |
Definition at line 452 of file py_capi_utils.c.
References PyC_FileAndNum(), and PyC_IsInterpreterActive().
| PyObject* PyC_FlagSet_AsString | ( | PyC_FlagSet * | item | ) |
Definition at line 1133 of file py_capi_utils.c.
References PyC_FlagSet::identifier.
Referenced by PyC_FlagSet_ValueFromID().
| PyObject* PyC_FlagSet_FromBitfield | ( | PyC_FlagSet * | items, |
| int | flag | ||
| ) |
Definition at line 1217 of file py_capi_utils.c.
References PyC_StringEnum::items, NULL, ret, and PyC_StringEnumItems::value.
Referenced by bpy_bmesh_select_mode_get().
| int PyC_FlagSet_ToBitfield | ( | PyC_FlagSet * | items, |
| PyObject * | value, | ||
| int * | r_value, | ||
| const char * | error_prefix | ||
| ) |
Definition at line 1172 of file py_capi_utils.c.
References hash, PyC_StringEnum::items, NULL, pos, PyC_FlagSet_ValueFromID(), and ret.
Referenced by bpy_bmesh_select_mode_set(), bpy_bmesh_transform(), and bpy_slot_from_py().
| int PyC_FlagSet_ValueFromID | ( | PyC_FlagSet * | item, |
| const char * | identifier, | ||
| int * | r_value, | ||
| const char * | error_prefix | ||
| ) |
Definition at line 1156 of file py_capi_utils.c.
References PyC_FlagSet_AsString(), and PyC_FlagSet_ValueFromID_int().
Referenced by bpy_slot_from_py(), M_Noise_fractal(), M_Noise_hetero_terrain(), M_Noise_hybrid_multi_fractal(), M_Noise_multi_fractal(), M_Noise_noise(), M_Noise_noise_vector(), M_Noise_ridged_multi_fractal(), M_Noise_turbulence(), M_Noise_turbulence_vector(), M_Noise_variable_lacunarity(), M_Noise_voronoi(), and PyC_FlagSet_ToBitfield().
| int PyC_FlagSet_ValueFromID_int | ( | PyC_FlagSet * | item, |
| const char * | identifier, | ||
| int * | r_value | ||
| ) |
Definition at line 1144 of file py_capi_utils.c.
References PyC_FlagSet::identifier, STREQ, and PyC_FlagSet::value.
Referenced by PyC_FlagSet_ValueFromID().
| PyObject* PyC_FrozenSetFromStrings | ( | const char ** | strings | ) |
Definition at line 501 of file py_capi_utils.c.
References NULL, ret, and str.
Referenced by BPyInit__bpy_path().
| bool PyC_IsInterpreterActive | ( | void | ) |
Definition at line 929 of file py_capi_utils.c.
References NULL.
Referenced by BPY_context_dict_clear_members_array(), BPY_context_member_get(), BPY_text_free_code(), PyC_FileAndNum_Safe(), PyC_LineSpit(), and PyC_StackSpit().
| void PyC_LineSpit | ( | void | ) |
Definition at line 364 of file py_capi_utils.c.
References PyC_FileAndNum(), and PyC_IsInterpreterActive().
Referenced by _RNA_warning().
| void PyC_List_Fill | ( | PyObject * | list, |
| PyObject * | value | ||
| ) |
Definition at line 219 of file py_capi_utils.c.
| int PyC_Long_AsBool | ( | PyObject * | value | ) |
Don't use bool return type, so -1 can be used as an error value.
Definition at line 1422 of file py_capi_utils.c.
References UNLIKELY.
Referenced by bpy_bm_elem_hflag_set(), bpy_bm_elem_hide_set(), bpy_bm_elem_select_set(), bpy_bmesh_select_flush(), bpy_bmloopuv_flag_set(), bpy_bmvertskin_flag_set(), bpy_prop_boolean_get_fn(), bpy_slot_from_py(), pyrna_array_contains_py(), and pyrna_py_to_prop_array_index().
| int16_t PyC_Long_AsI16 | ( | PyObject * | value | ) |
Definition at line 1442 of file py_capi_utils.c.
References INT16_MAX, and UNLIKELY.
Referenced by bpy_app_debug_value_set().
| int8_t PyC_Long_AsI8 | ( | PyObject * | value | ) |
Definition at line 1432 of file py_capi_utils.c.
| uint16_t PyC_Long_AsU16 | ( | PyObject * | value | ) |
Definition at line 1467 of file py_capi_utils.c.
References UINT16_MAX, and UNLIKELY.
| uint32_t PyC_Long_AsU32 | ( | PyObject * | value | ) |
Definition at line 1477 of file py_capi_utils.c.
References UINT32_MAX, and UNLIKELY.
Referenced by C_BVHTree_FromPolygons(), pygpu_framebuffer_clear(), and pygpu_IndexBuf__tp_new().
| uint8_t PyC_Long_AsU8 | ( | PyObject * | value | ) |
Definition at line 1457 of file py_capi_utils.c.
| void PyC_MainModule_Backup | ( | PyObject ** | r_main_mod | ) |
Definition at line 915 of file py_capi_utils.c.
Referenced by bpy_rna_uilayout_introspect(), bpy_run_string_impl(), PyC_RunString_AsIntPtr(), PyC_RunString_AsNumber(), PyC_RunString_AsStringAndSize(), and python_script_exec().
| void PyC_MainModule_Restore | ( | PyObject * | main_mod | ) |
Definition at line 922 of file py_capi_utils.c.
Referenced by bpy_rna_uilayout_introspect(), bpy_run_string_impl(), PyC_RunString_AsIntPtr(), PyC_RunString_AsNumber(), PyC_RunString_AsStringAndSize(), and python_script_exec().
| bool PyC_NameSpace_ImportArray | ( | PyObject * | py_dict, |
| const char * | imports[] | ||
| ) |
Definition at line 894 of file py_capi_utils.c.
Referenced by bpy_run_string_impl(), PyC_RunString_AsIntPtr(), PyC_RunString_AsNumber(), and PyC_RunString_AsStringAndSize().
| PyObject* PyC_Object_GetAttrStringArgs | ( | PyObject * | o, |
| Py_ssize_t | n, | ||
| ... | |||
| ) |
Definition at line 468 of file py_capi_utils.c.
| void PyC_ObSpit | ( | const char * | name, |
| PyObject * | var | ||
| ) |
Definition at line 314 of file py_capi_utils.c.
Referenced by bpy_class_free(), PyC_RunQuicky(), and pyrna_subtype_set_rna().
| void PyC_ObSpitStr | ( | char * | result, |
| size_t | result_len, | ||
| PyObject * | var | ||
| ) |
A version of PyC_ObSpit that writes into a string (and doesn't take a name argument). Use for logging.
Definition at line 336 of file py_capi_utils.c.
References BLI_snprintf(), NULL, result, and type.
Referenced by pyrna_srna_ExternalType().
| int PyC_ParseBool | ( | PyObject * | o, |
| void * | p | ||
| ) |
Use with PyArg_ParseTuple's "O&" formatting.
Definition at line 241 of file py_capi_utils.c.
References ELEM.
Referenced by bpy_blend_paths(), bpy_bm_new(), bpy_bm_utils_edge_rotate(), bpy_bm_utils_face_join(), bpy_bm_utils_face_split(), bpy_bmesh_from_mesh(), bpy_bmesh_from_object(), bpy_bmface_copy(), bpy_bmface_copy_from_face_interp(), bpy_bmloop_copy_from_face_interp(), BPy_BoolProperty(), bpy_lib_load(), bpy_lib_write(), bpy_orphans_purge(), bpyunits_to_string(), C_BVHTree_FromObject(), C_BVHTree_FromPolygons(), M_Geometry_intersect_line_plane(), M_Geometry_intersect_line_sphere(), M_Geometry_intersect_line_sphere_2d(), M_Geometry_intersect_ray_tri(), py_find_nearest_cb(), pygpu_offscreen_draw_view3d(), pygpu_offscreen_unbind(), pygpu_state_depth_mask_set(), pygpu_state_front_facing_set(), pyop_as_string(), and pyrna_struct_is_property_set().
| int PyC_ParseStringEnum | ( | PyObject * | o, |
| void * | p | ||
| ) |
Use with PyArg_ParseTuple's "O&" formatting.
Definition at line 257 of file py_capi_utils.c.
References e, NULL, and STREQ.
Referenced by bpy_lib_write(), bpy_resource_path(), bpy_system_resource(), bpy_user_resource(), py_imbuf_resize(), pygpu_batch__tp_new(), pygpu_buffer__tp_new(), pygpu_IndexBuf__tp_new(), pygpu_shader_code_from_builtin(), pygpu_shader_from_builtin(), pygpu_state_blend_set(), pygpu_state_depth_test_set(), pygpu_state_face_culling_set(), pygpu_texture__tp_new(), and pygpu_texture_clear().
| void* PyC_RNA_AsPointer | ( | PyObject * | value, |
| const char * | type_name | ||
| ) |
Definition at line 1091 of file py_capi_utils.c.
References NULL, result, and STREQ.
Referenced by BlenderTextureShader___init__(), bpy_bm_from_edit_mesh(), bpy_bmesh_from_mesh(), bpy_bmesh_from_object(), bpy_bmesh_to_mesh(), C_BVHTree_FromObject(), and pygpu_offscreen_draw_view3d().
| void PyC_RunQuicky | ( | const char * | filepath, |
| int | n, | ||
| ... | |||
| ) |
Definition at line 944 of file py_capi_utils.c.
References NULL, ptr, PyC_DefaultNameSpace(), PyC_ObSpit(), and ret.
| bool PyC_RunString_AsIntPtr | ( | const char ** | imports, |
| const char * | expr, | ||
| const char * | filename, | ||
| intptr_t * | r_value | ||
| ) |
| bool PyC_RunString_AsNumber | ( | const char ** | imports, |
| const char * | expr, | ||
| const char * | filename, | ||
| double * | r_value | ||
| ) |
| bool PyC_RunString_AsString | ( | const char ** | imports, |
| const char * | expr, | ||
| const char * | filename, | ||
| char ** | r_value | ||
| ) |
| bool PyC_RunString_AsStringAndSize | ( | const char ** | imports, |
| const char * | expr, | ||
| const char * | filename, | ||
| char ** | r_value, | ||
| size_t * | r_value_size | ||
| ) |
| void PyC_StackSpit | ( | void | ) |
Definition at line 382 of file py_capi_utils.c.
References PyC_IsInterpreterActive().
| const char* PyC_StringEnum_FindIDFromValue | ( | const struct PyC_StringEnumItems * | items, |
| const int | value | ||
| ) |
Definition at line 285 of file py_capi_utils.c.
References PyC_StringEnumItems::id, PyC_StringEnum::items, and NULL.
Referenced by pygpu_buffer__tp_repr(), pygpu_state_blend_get(), pygpu_state_depth_test_get(), and pygpu_texture_format_get().
| char PyC_StructFmt_type_from_str | ( | const char * | typestr | ) |
Definition at line 1501 of file py_capi_utils.c.
Referenced by gl_buffer_type_from_py_buffer(), idp_array_type_from_formatstr_and_size(), idp_from_PySequence(), and pygpu_IndexBuf__tp_new().
| bool PyC_StructFmt_type_is_bool | ( | char | format | ) |
Definition at line 1561 of file py_capi_utils.c.
| bool PyC_StructFmt_type_is_byte | ( | char | format | ) |
Definition at line 1549 of file py_capi_utils.c.
Referenced by gl_buffer_type_from_py_buffer().
| bool PyC_StructFmt_type_is_float_any | ( | char | format | ) |
Definition at line 1515 of file py_capi_utils.c.
Referenced by gl_buffer_type_from_py_buffer(), idp_array_type_from_formatstr_and_size(), idp_from_PySequence(), and pygpu_IndexBuf__tp_new().
| bool PyC_StructFmt_type_is_int_any | ( | char | format | ) |
Definition at line 1527 of file py_capi_utils.c.
Referenced by gl_buffer_type_from_py_buffer(), idp_array_type_from_formatstr_and_size(), and idp_from_PySequence().
| void PyC_Tuple_Fill | ( | PyObject * | tuple, |
| PyObject * | value | ||
| ) |
Caller needs to ensure tuple is uninitialized. Handy for filling a tuple with None for eg.
Definition at line 208 of file py_capi_utils.c.
Referenced by kdtree_nearest_to_py_and_check(), py_bvhtree_nearest_to_py_none(), and py_bvhtree_raycast_to_py_none().
| PyObject* PyC_Tuple_PackArray_Bool | ( | const bool * | array, |
| uint | len | ||
| ) |
Definition at line 189 of file py_capi_utils.c.
References len.
Referenced by bpy_prop_boolean_array_set_fn().
Definition at line 153 of file py_capi_utils.c.
References len.
Referenced by bpy_gizmo_target_get_range(), bpy_gizmo_target_get_value(), bpy_prop_float_array_set_fn(), and py_rna_gizmo_handler_set_cb().
Definition at line 162 of file py_capi_utils.c.
References len.
| PyObject* PyC_Tuple_PackArray_I32 | ( | const int * | array, |
| uint | len | ||
| ) |
Definition at line 171 of file py_capi_utils.c.
References len.
Referenced by bpy_prop_int_array_set_fn().
| PyObject* PyC_Tuple_PackArray_I32FromBool | ( | const int * | array, |
| uint | len | ||
| ) |
Definition at line 180 of file py_capi_utils.c.
References len.
| const char* PyC_UnicodeAsByte | ( | PyObject * | py_str, |
| PyObject ** | coerce | ||
| ) |
Definition at line 813 of file py_capi_utils.c.
Referenced by pyrna_py_to_prop(), and pyrna_WindowManager_clipboard_set().
| const char* PyC_UnicodeAsByteAndSize | ( | PyObject * | py_str, |
| Py_ssize_t * | size, | ||
| PyObject ** | coerce | ||
| ) |
Definition at line 786 of file py_capi_utils.c.
References NULL, result, and size().
Referenced by idp_from_PyUnicode().
| PyObject* PyC_UnicodeFromByte | ( | const char * | str | ) |
Definition at line 853 of file py_capi_utils.c.
References PyC_UnicodeFromByteAndSize(), and str.
Referenced by bpy_app_autoexec_fail_message_get(), bpy_app_tempdir_get(), bpy_blend_paths_visit_cb(), bpy_resource_path(), bpy_script_paths(), bpy_system_resource(), bpy_user_resource(), py_imbuf_filepath_get(), PyC_DefaultNameSpace(), pyrna_param_to_py(), and python_script_exec().
| PyObject* PyC_UnicodeFromByteAndSize | ( | const char * | str, |
| Py_ssize_t | size | ||
| ) |
Definition at line 838 of file py_capi_utils.c.
References result, size(), and str.
Referenced by idprop_py_from_idp_string(), PyC_UnicodeFromByte(), pyrna_prop_to_py(), and pyrna_WindowManager_clipboard_get().