Blender
V3.3
|
#include "bmesh_operator_api.h"
Go to the source code of this file.
Macros | |
#define | BM_ELEM_INDEX_VALIDATE(_bm, _msg_a, _msg_b) BM_mesh_elem_index_validate(_bm, __FILE__ ":" STRINGIFY(__LINE__), __func__, _msg_a, _msg_b) |
#define | _BMESH_DUMMY_ABORT() (void)0 |
#define | BMESH_ASSERT(a) |
Typedefs | |
typedef enum eBMOpErrorLevel | eBMOpErrorLevel |
Enumerations | |
enum | eBMOpErrorLevel { BMO_ERROR_CANCEL = 0 , BMO_ERROR_WARN = 1 , BMO_ERROR_FATAL = 2 } |
Functions | |
void | BMO_error_raise (BMesh *bm, BMOperator *owner, eBMOpErrorLevel level, const char *msg) ATTR_NONNULL(1 |
void bool | BMO_error_get (BMesh *bm, const char **r_msg, BMOperator **r_op, eBMOpErrorLevel *r_level) |
bool | BMO_error_get_at_level (BMesh *bm, eBMOpErrorLevel level, const char **r_msg, BMOperator **r_op) |
bool | BMO_error_occurred_at_level (BMesh *bm, eBMOpErrorLevel level) |
bool | BMO_error_pop (BMesh *bm, const char **r_msg, BMOperator **r_op, eBMOpErrorLevel *r_level) |
void | BMO_error_clear (BMesh *bm) |
Definition at line 73 of file bmesh_error.h.
#define BM_ELEM_INDEX_VALIDATE | ( | _bm, | |
_msg_a, | |||
_msg_b | |||
) | BM_mesh_elem_index_validate(_bm, __FILE__ ":" STRINGIFY(__LINE__), __func__, _msg_a, _msg_b) |
Definition at line 66 of file bmesh_error.h.
#define BMESH_ASSERT | ( | a | ) |
This is meant to be higher level than BLI_assert(), its enabled even when in Release mode.
Definition at line 80 of file bmesh_error.h.
typedef enum eBMOpErrorLevel eBMOpErrorLevel |
enum eBMOpErrorLevel |
Enumerator | |
---|---|
BMO_ERROR_CANCEL | Use when the operation could not succeed, typically from input that isn't sufficient for completing the operation. |
BMO_ERROR_WARN | Use this when one or more operations could not succeed, when the resulting mesh can be used (since some operations succeeded or no change was made). This is used by default. |
BMO_ERROR_FATAL | The mesh resulting from this operation should not be used (where possible). It should not be left in a corrupt state either. See BMBackup type & function calls. |
Definition at line 16 of file bmesh_error.h.
Definition at line 1452 of file bmesh_operators.c.
References bm, BMO_error_pop(), and NULL.
Referenced by BM_mesh_data_free(), bpy_bm_op_as_py_error(), and BPy_BMO_call().
void bool BMO_error_get | ( | BMesh * | bm, |
const char ** | r_msg, | ||
BMOperator ** | r_op, | ||
eBMOpErrorLevel * | r_level | ||
) |
Gets the topmost error from the stack. returns error code or 0 if no error.
Definition at line 1480 of file bmesh_operators.c.
References bm, err, BMesh::errorstack, ListBase::first, and NULL.
Referenced by BMO_error_pop(), and bpy_bm_op_as_py_error().
bool BMO_error_get_at_level | ( | BMesh * | bm, |
eBMOpErrorLevel | level, | ||
const char ** | r_msg, | ||
BMOperator ** | r_op | ||
) |
Definition at line 1500 of file bmesh_operators.c.
References bm, err, BMesh::errorstack, ListBase::first, and BMOpError::level.
bool BMO_error_occurred_at_level | ( | BMesh * | bm, |
eBMOpErrorLevel | level | ||
) |
Definition at line 1470 of file bmesh_operators.c.
References bm, err, BMesh::errorstack, ListBase::first, and BMOpError::level.
Referenced by bmo_dissolve_faces_exec(), bpy_bm_op_as_py_error(), build_hull(), edbm_bridge_edge_loops_for_single_editmesh(), and edbm_connect_vert_pair().
bool BMO_error_pop | ( | BMesh * | bm, |
const char ** | r_msg, | ||
BMOperator ** | r_op, | ||
eBMOpErrorLevel * | r_level | ||
) |
Definition at line 1520 of file bmesh_operators.c.
References BLI_remlink(), bm, BMO_error_get(), err, BMesh::errorstack, ListBase::first, MEM_freeN, and result.
Referenced by BMO_error_clear(), and EDBM_op_finish().
void BMO_error_raise | ( | BMesh * | bm, |
BMOperator * | owner, | ||
eBMOpErrorLevel | level, | ||
const char * | msg | ||
) |
Pushes an error onto the bmesh error stack. if msg is null, then the default message for the errcode
is used.
Referenced by bmo_bisect_plane_exec(), bmo_bridge_loops_exec(), bmo_connect_verts_exec(), bmo_grid_fill_exec(), bmo_reverse_colors_exec(), bmo_rotate_colors_exec(), and bmo_subdivide_edgering_exec().