22 #define USE_EDGE_REGION_FLAGS
45 if (use_select_history) {
51 BMLoop *l_org, *l_org_first;
59 if (select_history_map) {
82 l_side_iter = l_side_iter->
next;
84 l_side_iter = l_side_iter->
next;
86 l_side_iter = l_side_iter->
next;
89 if (select_history_map) {
102 }
while (((
void)(l_new = l_new->
next), (l_org = l_org->
next)) != l_org_first);
105 if (select_history_map) {
179 "duplicate geom=%fve use_select_history=%b",
198 const bool edge_normal_flip = !(
e->l &&
e->v1 !=
e->l->v);
199 if (edge_normal_flip == use_normal_flip) {
202 f_verts[2] = e_new->
v2;
203 f_verts[3] = e_new->
v1;
208 f_verts[2] = e_new->
v1;
209 f_verts[3] = e_new->
v2;
239 if (use_select_history) {
251 if (select_history_map) {
260 if (BM_vert_is_wire_endpoint(
v)) {
270 if (select_history_map) {
278 #ifdef USE_EDGE_REGION_FLAGS
304 r_e_hflag[0] &= hflag_enable;
305 r_e_hflag[1] = hflag_disable & ~r_e_hflag[1];
315 BMIter iter, fiter, viter;
319 bool found, delorig =
false;
324 "use_normal_from_adjacent");
326 "use_dissolve_ortho_edges");
332 "duplicate use_select_history=%b",
361 if ((edge_face_tot > 1) && (found ==
false)) {
390 if (found ==
false) {
402 if (delorig ==
true) {
406 BMO_slot_copy(op, slots_in,
"geom", &dupeop, slots_in,
"geom");
435 int dissolve_verts_len = 0;
436 float average_normal[3];
437 if (use_dissolve_ortho_edges) {
444 average_normal[2] = 1.0f;
450 int boundary_verts_len_maybe = 2 * boundary_edges_len;
451 dissolve_verts =
MEM_mallocN(boundary_verts_len_maybe *
sizeof(*dissolve_verts), __func__);
454 BMO_slot_copy(&dupeop, slots_out,
"geom.out", op, slots_out,
"geom.out");
460 #ifdef USE_EDGE_REGION_FLAGS
484 if (BMO_slot_map_contains(slot_edges_exclude,
e)) {
496 if (use_dissolve_ortho_edges) {
505 bool edge_normal_flip;
506 if (use_normal_from_adjacent ==
false) {
510 edge_normal_flip = !(e_new->
l ? (e_new->
l->
v == e_new->
v1) : (!
e->l || !(
e->l->v ==
e->v1)));
515 edge_normal_flip = !(
e->l &&
e->v1 !=
e->l->v);
518 if (edge_normal_flip == use_normal_flip) {
521 f_verts[2] = e_new->
v2;
522 f_verts[3] = e_new->
v1;
527 f_verts[2] = e_new->
v1;
528 f_verts[3] = e_new->
v2;
531 #ifdef USE_EDGE_REGION_FLAGS
537 if (f_edges[1] ==
NULL) {
548 if (f_edges[3] ==
NULL) {
569 dissolve_verts[dissolve_verts_len++] =
v1;
573 dissolve_verts[dissolve_verts_len++] =
v2;
588 if (BM_vert_is_wire_endpoint(
v)) {
597 if (dissolve_verts) {
598 BMVert **v_iter = &dissolve_verts[0];
599 for (
int i = dissolve_verts_len; i--; v_iter++) {
629 BMIter viter, eiter, fiter;
633 float edge_normal[3];
668 if (i == 0 || i > 2) {
677 edge_face_count =
NULL;
779 float *vert_accum = vert_angles +
bm->
totvert;
805 vert_accum[index] += face_angles[i];
817 if (vert_accum[index]) {
836 BMO_slot_copy(op, slots_in,
"geom", &reverseop, slots_in,
"faces");
842 BMO_slot_copy(op, slots_in,
"geom", &extrudeop, slots_in,
"geom");
850 BMO_slot_copy(&extrudeop, slots_out,
"geom.out", op, slots_out,
"geom.out");
CustomData interface, see also DNA_customdata_types.h.
bool CustomData_has_layer(const struct CustomData *data, int type)
void * CustomData_bmesh_get(const struct CustomData *data, void *block, int type)
#define BLI_buffer_reinit_data(buffer_, type_, new_count_)
#define BLI_buffer_declare_static(type_, name_, flag_, static_count_)
#define BLI_buffer_free(name_)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
MINLINE float shell_v3v3_normalized_to_dist(const float a[3], const float b[3])
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
MINLINE float normalize_v3(float r[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float normalize_v3_length(float r[3], float unit_scale)
void angle_poly_v3(float *angles, const float *verts[3], int len)
MINLINE void zero_v3(float r[3])
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3(float r[3], const float a[3])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
#define BM_DISK_EDGE_NEXT(e, v)
#define BM_DEFAULT_NGON_STACK_SIZE
#define BM_FACE_FIRST_LOOP(p)
void BM_elem_attrs_copy(BMesh *bm_src, BMesh *bm_dst, const void *ele_src, void *ele_dst)
BMFace * BM_face_create_quad_tri(BMesh *bm, BMVert *v1, BMVert *v2, BMVert *v3, BMVert *v4, const BMFace *f_example, const eBMCreateFlag create_flag)
Make Quad/Triangle.
BMVert * BM_vert_create(BMesh *bm, const float co[3], const BMVert *v_example, const eBMCreateFlag create_flag)
Main function for creating a new vertex.
BMFace * BM_face_create_verts(BMesh *bm, BMVert **vert_arr, const int len, const BMFace *f_example, const eBMCreateFlag create_flag, const bool create_edges)
BMFace * bmesh_kernel_join_face_kill_edge(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e)
Join Face Kill Edge (JFKE)
void BM_vert_kill(BMesh *bm, BMVert *v)
void BM_edge_kill(BMesh *bm, BMEdge *e)
BMFace * BM_face_copy(BMesh *bm_dst, BMesh *bm_src, BMFace *f, const bool copy_verts, const bool copy_edges)
BMFace * BM_face_create(BMesh *bm, BMVert **verts, BMEdge **edges, const int len, const BMFace *f_example, const eBMCreateFlag create_flag)
BMEdge * BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *e_example, const eBMCreateFlag create_flag)
Main function for creating a new edge.
#define BM_elem_index_get(ele)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
#define BM_ITER_ELEM_INDEX(ele, iter, data, itype, indexvar)
ATTR_WARN_UNUSED_RESULT BMesh * bm
GHash * BM_select_history_map_create(BMesh *bm)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
BMVert * BM_edge_collapse(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool do_del, const bool kill_degenerate_faces)
void BMO_slot_buffer_flag_enable(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, short oflag)
BMO_FLAG_BUFFER.
#define BMO_edge_flag_test(bm, e, oflag)
void * BMO_iter_step(BMOIter *iter)
#define BMO_edge_flag_enable(bm, e, oflag)
int BMO_slot_map_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
float BMO_slot_float_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void * BMO_iter_new(BMOIter *iter, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char restrictmask)
New Iterator.
#define BMO_vert_flag_enable(bm, e, oflag)
void BMO_op_exec(BMesh *bm, BMOperator *op)
BMESH OPSTACK EXEC OP.
void BMO_slot_buffer_from_enabled_flag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, short oflag)
#define BMO_face_flag_enable(bm, e, oflag)
#define BMO_slot_copy(op_src, slots_src, slot_name_src, op_dst, slots_dst, slot_name_dst)
void BMO_op_init(BMesh *bm, BMOperator *op, int flag, const char *opname)
BMESH OPSTACK INIT OP.
#define BMO_ITER(ele, iter, slot_args, slot_name, restrict_flag)
#define BMO_vert_flag_test(bm, e, oflag)
bool BMO_op_initf(BMesh *bm, BMOperator *op, int flag, const char *fmt,...)
void BMO_op_finish(BMesh *bm, BMOperator *op)
BMESH OPSTACK FINISH OP.
void * BMO_iter_map_value_ptr(BMOIter *iter)
#define BMO_elem_flag_enable(bm, ele, oflag)
bool BMO_op_callf(BMesh *bm, int flag, const char *fmt,...)
BMOpSlot * BMO_slot_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier)
BMESH OPSTACK GET SLOT.
void BMO_slot_bool_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, bool i)
#define BMO_elem_flag_test(bm, ele, oflag)
#define BMO_face_flag_test(bm, e, oflag)
bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void BM_vert_normal_update(BMVert *v)
void BM_face_normal_flip(BMesh *bm, BMFace *f)
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
bool BM_vert_is_manifold(const BMVert *v)
BMLoop * BM_edge_other_loop(BMEdge *e, BMLoop *l)
bool BM_vert_is_edge_pair(const BMVert *v)
BLI_INLINE bool BM_edge_is_boundary(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_edge_is_wire(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
static void solidify_add_thickness(BMesh *bm, const float dist)
void bmo_extrude_discrete_faces_exec(BMesh *bm, BMOperator *op)
static void bm_extrude_copy_face_loop_attributes(BMesh *bm, BMFace *f)
Copy the loop pair from an adjacent face to both sides of this quad.
static bool bm_extrude_region_edge_flag(const BMVert *v, char r_e_hflag[2])
void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op)
void bmo_extrude_vert_indiv_exec(BMesh *bm, BMOperator *op)
void bmo_solidify_face_region_exec(BMesh *bm, BMOperator *op)
static void bm_extrude_disable_skin_root(BMesh *bm, BMVert *v)
static void calc_solidify_normals(BMesh *bm)
void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
ccl_device_inline float2 fabs(const float2 &a)
struct BMLoop * radial_next
struct BMOpSlot slots_out[BMO_OP_MAX_SLOTS]
struct BMOpSlot slots_in[BMO_OP_MAX_SLOTS]