83#define PARTIAL_TYPE_MAX 2
136 custom_data->
data =
nullptr;
176#define USE_FACE_SUBSTITUTE
177#ifdef USE_FACE_SUBSTITUTE
178# define FACE_SUBSTITUTE_INDEX INT_MIN
186 BMFace *best_face =
nullptr;
190 BMLoop *l_radial_next =
l->radial_next;
191 BMFace *f_test = l_radial_next->
f;
208 if (best_face ==
nullptr) {
236 }
while ((l_iter = l_iter->
next) != l_first);
240 tcld->
bm_origfaces, cd_face_map, cd_loop_map, f_substitute,
true,
true);
245 *((
BMFace **)&f_copy->
no[0]) = f_substitute_copy;
252 return *((
BMFace **)&f_copy->
no[0]);
278 for (j = 0; j < l_num; j++) {
286 tcld->
bm_origfaces, cd_face_map, cd_loop_map,
l->f,
true,
true);
288#ifdef USE_FACE_SUBSTITUTE
302 loop_weights[j] = 0.0f;
316 bm,
v, layer_nr, loop_weights, tcld->
arena);
334 params.use_toolflags =
false;
358 int layer_math_map_len = 0;
359 for (
int i = 0;
i <
bm->ldata.totlayer;
i++) {
361 customdatalayer_map[layer_math_map_len++] =
i;
375 const bool use_merge_group)
380 if (
bm->shapenr > 1) {
411 for (
int j = tc->
data_len; j--; tob++,
i++) {
429 if (!customdatacorrect) {
463 bool use_merge_group =
false;
469 use_merge_group =
true;
496 if (tc->custom.type.data !=
nullptr) {
521 return td ? td->
iloc :
v->co;
531 const float *co_orig_3d = td->
iloc;
538 const float *v_proj_axis =
v->no;
542 if (do_loop_weight) {
549 loop_weights = do_loop_weight ?
static_cast<float *
>(
BLI_array_alloca(loop_weights, l_num)) :
551 for (j = 0; j < l_num; j++) {
557#ifdef USE_FACE_SUBSTITUTE
570 if (do_loop_weight) {
571 const float eps = 1.0e-8f;
572 const BMLoop *l_prev =
l->prev;
573 const BMLoop *l_next =
l->next;
586 ((l_prev = l_prev->
prev) !=
l->next)))
593 ((l_next = l_next->
next) !=
l->prev)))
599 if (co_prev_ok && co_next_ok) {
601 v->co,
UNPACK3(v_proj), v_proj_axis);
603 loop_weights[j] = (dist >= 0.0f) ? 1.0f : ((dist <= -
eps) ? 0.0f : (1.0f + (dist /
eps)));
604 if (
UNLIKELY(!isfinite(loop_weights[j]))) {
605 loop_weights[j] = 0.0f;
609 loop_weights[j] = 0.0f;
617 if (do_loop_weight) {
637 const bool update_loop_mdisps = is_moved && do_loop_mdisps && (tcld->
cd_loop_mdisp_offset != -1);
638 if (update_loop_mdisps) {
648 float f_copy_center[3];
659 faces_center[j_other],
671 if (tcld ==
nullptr) {
681 if (use_merge_group) {
690 if (use_merge_group) {
722 BMLoop *l_iter, *l_first, *l_copy;
728 l_copy = l_copy->
next;
729 }
while ((l_iter = l_iter->
next) != l_first);
741 const bool calc_single_islands,
742 const bool calc_island_center,
743 const bool calc_island_axismtx,
754 int *groups_array =
nullptr;
755 int (*group_index)[2] =
nullptr;
757 bool has_only_single_islands =
bm->totedgesel == 0 &&
bm->totfacesel == 0;
758 if (has_only_single_islands && !calc_single_islands) {
762 data.island_vert_map =
static_cast<int *
>(
769 if (!has_only_single_islands) {
788 if (calc_island_center) {
789 data.center =
static_cast<float (*)[3]
>(
793 if (calc_island_axismtx) {
794 data.axismtx =
static_cast<float (*)[3][3]
>(
801 ele_array = (htype ==
BM_FACE) ? (
void **)
bm->ftable : (
void **)
bm->etable;
806 for (
i = 0;
i <
data.island_tot;
i++) {
809 const int fg_sta = group_index[
i][0];
810 const int fg_len = group_index[
i][1];
811 float co[3], no[3], tangent[3];
824 for (j = 0; j < fg_len; j++) {
825 ese.
ele =
static_cast<BMElem *
>(ele_array[groups_array[fg_sta + j]]);
834 float tmp_no[3], tmp_tangent[3];
871 if (calc_single_islands) {
874 int group_tot_single = 0;
878 group_tot_single += 1;
882 if (group_tot_single != 0) {
883 if (calc_island_center) {
885 data.center,
sizeof(*
data.center) * (
data.island_tot + group_tot_single)));
887 if (calc_island_axismtx) {
889 data.axismtx,
sizeof(*
data.axismtx) * (
data.island_tot + group_tot_single)));
894 data.island_vert_map[
i] =
data.island_tot;
908 data.island_tot += 1;
914 *r_island_data =
data;
919 if (island_data->
center) {
942 const float mtx[3][3])
950 if (dists[i0] <= dists[i1]) {
960 if (dists[i0] <= dists[i2]) {
964 float vm0[3], vm1[3], vm2[3];
977 dist0 = dists[i1] +
len_v3(vec);
980 if (dist0 < dists[i0]) {
982 if (index !=
nullptr) {
983 index[i0] = index[i1];
995 if (edge->
l ==
nullptr) {
1011 const float mtx[3][3],
1038 if (index !=
nullptr) {
1044 if (index !=
nullptr) {
1091 if (dists[i1] > dists[i2]) {
1131 for (
BMLoop *l_other =
l->next->next; l_other !=
l; l_other = l_other->next) {
1132 BMVert *v_other = l_other->v;
1158 for (
LinkNode *lnk = queue_next; lnk; lnk = lnk->
next) {
1181#define TRANSFORM_MAXDIST_MIRROR 0.00002f
1185 if (quadrant[0] && ((co[0] * quadrant[0]) < -epsilon)) {
1188 if (quadrant[1] && ((co[1] * quadrant[1]) < -epsilon)) {
1191 if (quadrant[2] && ((co[2] * quadrant[2]) < -epsilon)) {
1198 const bool use_select,
1199 const bool use_topology,
1200 const bool mirror_axis[3],
1208 int i,
flag, totvert =
bm->totvert;
1212 float select_sum[3] = {0};
1225 for (
int a = 0; a < 3; a++) {
1226 if (mirror_axis[a]) {
1227 quadrant[a] = select_sum[a] >= 0.0f ? 1 : -1;
1234 uint mirror_elem_len = 0;
1235 int *index[3] = {
nullptr,
nullptr,
nullptr};
1236 bool is_single_mirror_axis = (mirror_axis[0] + mirror_axis[1] + mirror_axis[2]) == 1;
1237 bool test_selected_only = use_select && is_single_mirror_axis;
1238 for (
int a = 0; a < 3; a++) {
1239 if (!mirror_axis[a]) {
1243 index[a] =
static_cast<int *
>(
MEM_mallocN(totvert *
sizeof(*index[a]), __func__));
1249 int i_mirr = index[a][
i];
1262 if (vert_map[i_mirr].
flag != 0) {
1279 if (!mirror_elem_len) {
1283 else if (!is_single_mirror_axis) {
1285 for (
int a = 0; a < 3; a++) {
1286 if (!mirror_axis[a]) {
1291 for (
i = 0;
i < totvert;
i++) {
1292 int i_mirr = index[a][
i];
1296 if (vert_map[
i].index != -1 && !(vert_map[
i].
flag &
flag)) {
1297 if (vert_map[i_mirr].index == -1) {
1311 r_mirror_data->
vert_map = vert_map;
1333 float (*quats)[4] =
nullptr;
1348 t->
depsgraph, scene_eval, obedit_eval, em_eval, r_crazyspace_data->
defmats, defcos);
1356 if ((totleft > 0) || (totleft == -1))
1363 quats =
static_cast<float (*)[4]
>(
1368 r_crazyspace_data->
quats = quats;
1372 const float smtx[3][3],
1373 const float defmat[3][3],
1374 const float quat[4],
1378 if (quat || defmat) {
1379 float mat[3][3], qmat[3][3], imat[3][3];
1409 if (r_crazyspace_data->
quats) {
1421 const int island_index,
1422 const float iloc[3],
1425 if (island_data->
center && island_index != -1) {
1440 const int island_index)
1463 if ((island_index != -1) && island_data->
axismtx) {
1501 float mtx[3][3], smtx[3][3];
1536 data_len =
bm->totvertsel;
1539 if (data_len == 0) {
1555 if (is_island_center) {
1562 const bool calc_island_center = !is_snap_rotate;
1568 em, calc_single_islands, calc_island_center, calc_island_axismtx, &island_data);
1571 copy_m3_m4(mtx, tc->obedit->object_to_world().ptr());
1578 int *dists_index =
nullptr;
1579 float *dists =
nullptr;
1582 if (is_island_center) {
1589 if (tc->use_mirror_axis_any) {
1592 const bool mirror_axis[3] = {
1593 bool(tc->use_mirror_axis_x), bool(tc->use_mirror_axis_y), bool(tc->use_mirror_axis_z)};
1595 em, use_select, use_topology, mirror_axis, &mirror_data);
1617 tc->data_len = data_len;
1634 int island_index = -1;
1636 const int connected_index = (dists_index && dists_index[a] != -1) ? dists_index[a] : a;
1648 td_mirror->
extra = eve;
1649 td_mirror->
loc = eve->
co;
1672 tob->
dist = dists[a];
1683 !crazyspace_data.
defmats.is_empty() ? crazyspace_data.
defmats[a].ptr() :
nullptr,
1685 crazyspace_data.
quats[a] :
1689 if (tc->use_mirror_axis_any) {
1721 if (looptri_is_dirty) {
1741 if (pupdate->
cache) {
1772 return pupdate->
cache;
1776 pupdate->
cache =
nullptr;
1785 int verts_group_count = 0;
1788 int verts_mask_count = 0;
1796 if (td->
factor == 0.0f) {
1804 verts_group[v_index] = -1;
1808 verts_group[v_index] = 1;
1815 verts_mask_count += 1;
1825 if (verts_group[v_mirr_index] == 0 &&
equals_v3v3(td_mirror->
loc, td_mirror->
iloc)) {
1835 if (verts_group[v_mirr_index] == -1) {
1836 verts_group[v_mirr_other_index] = -1;
1843 verts_mask_count += 1;
1852 if (td->
factor == 0.0f) {
1858 verts_mask[v_index].set();
1859 verts_mask_count += 1;
1872 verts_mask[v_mirr_other_index].set();
1873 verts_mask_count += 1;
1877 switch (partial_type) {
1880 params.do_tessellate =
true;
1881 params.do_normals =
true;
1883 *em->
bm,
params, verts_mask, verts_mask_count);
1888 params.do_tessellate =
true;
1889 params.do_normals =
true;
1892 *em->
bm,
params, verts_group, verts_group_count) :
1894 *em->
bm,
params, verts_mask, verts_mask_count));
1905 return pupdate->
cache;
1963 r_partial_state->
for_normals = partial_for_normals;
1999 params.face_normals =
true;
2010 params.face_normals = face_normals;
2049 td_mirror->
loc[0] *= -1;
2052 td_mirror->
loc[1] *= -1;
2055 td_mirror->
loc[2] *= -1;
2074 if (!is_canceling) {
2122 if (use_automerge) {
2127 bool has_face_sel = (
bm->totfacesel != 0);
2129 if (tc->use_mirror_axis_any) {
2135 for (
int i = tc->data_mirror_len;
i--; td_mirror++) {
2178 int td_selected_len = 0;
2184 int sv_array_index = 0;
2187 const int size_prev = r_loc_dst_buffer.
size();
2201 r_loc_dst_buffer.
append(v_other->
co);
2218 int size = sv.co_link_curr;
2219 sv.co_link_orig_3d = r_loc_dst_buffer.
as_span().slice(start,
size);
2220 sv.co_link_curr = 0;
2257 if ((fac > -FLT_EPSILON) && (fac < 1.0f + FLT_EPSILON)) {
2262 if (dist_sq_test < dist_sq_best) {
2264 dist_sq_best = dist_sq_test;
2269 }
while ((l_iter = l_iter->
next) != l_last);
2301 int td_selected_len = 0;
2306 bool found_invalid_edge_selection =
false;
2311 if (numsel == 0 || numsel > 2) {
2313 found_invalid_edge_selection =
true;
2319 if (found_invalid_edge_selection) {
2369 if (
ELEM(-1, td_index_1, td_index_2)) {
2373 int slot_1 = int(td_connected[td_index_1][0] != -1);
2374 int slot_2 = int(td_connected[td_index_2][0] != -1);
2376 td_connected[td_index_1][slot_1] = td_index_2;
2377 td_connected[td_index_2][slot_2] = td_index_1;
2391 int i_prev = td_connected[
i][1];
2392 while (!
ELEM(i_prev, -1,
i)) {
2393 int tmp = td_connected[i_prev][0] != i_curr ? td_connected[i_prev][0] :
2394 td_connected[i_prev][1];
2408 struct SlideTempDataMesh {
2418 bool vert_is_edge_pair;
2427 int find_best_dir(
const SlideTempDataMesh *curr_side_other,
2431 bool *r_do_isect_curr_dirs)
const
2433 *r_do_isect_curr_dirs =
false;
2435 if (f_curr == curr_side_other->fdata[0].f || v_dst == curr_side_other->fdata[0].v_dst) {
2439 if (f_curr == curr_side_other->fdata[1].f || v_dst == curr_side_other->fdata[1].v_dst) {
2443 if (curr_side_other->fdata[0].f || curr_side_other->fdata[1].f) {
2448 while (l_other->
f != l_edge->
f) {
2449 if (l_other->
f == curr_side_other->fdata[0].f) {
2453 if (l_other->
f == curr_side_other->fdata[1].f) {
2457 l_other = (l_other->
v == this->v ? l_other->
prev : l_other->
next)->radial_next;
2460 if (best_dir != -1) {
2461 *r_do_isect_curr_dirs =
true;
2466 if (
ELEM(
nullptr, this->fdata[0].f, this->fdata[1].f)) {
2467 return int(this->fdata[0].f !=
nullptr);
2475 *r_do_isect_curr_dirs =
true;
2482 if (is_boundary_0 && !is_boundary_1) {
2486 if (is_boundary_1 && !is_boundary_0) {
2493 float3 dir_curr = dst - src;
2498 return int(dot0 < dot1);
2500 } prev = {}, curr = {},
next = {}, next_next = {}, tmp = {};
2502 next.i = td_connected[i_curr][0] != i_prev ? td_connected[i_curr][0] : td_connected[i_curr][1];
2511 curr.sv = &sv_array[curr.i];
2512 curr.v =
static_cast<BMVert *
>(curr.sv->td->extra);
2522 while (curr.i != -1) {
2524 next_next.i = td_connected[
next.i][0] != curr.i ? td_connected[
next.i][0] :
2525 td_connected[
next.i][1];
2526 if (next_next.i != -1) {
2527 next_next.sv = &sv_array[next_next.i];
2528 next_next.v =
static_cast<BMVert *
>(next_next.sv->td->extra);
2542 if (
l->v == curr.v) {
2545 l_edge_next = l2->
e;
2546 v1_dst = l1->
prev->
v;
2547 v2_dst = l2->
next->
v;
2552 l_edge_next = l2->
prev->
e;
2553 v1_dst = l1->
next->
v;
2554 v2_dst = l2->
prev->
v;
2561 bool isect_curr_dirs =
false;
2564 int best_dir = curr.find_best_dir(&tmp, f_curr, l1, v1_dst, &isect_curr_dirs);
2566 if (curr.fdata[best_dir].f ==
nullptr) {
2567 curr.fdata[best_dir].f = f_curr;
2568 if (curr.vert_is_edge_pair) {
2572 curr.fdata[best_dir].v_dst = v1_dst;
2573 curr.fdata[best_dir].dst = v1_dst->
co;
2578 next.fdata[best_dir].f = f_curr;
2579 if (l_edge_next ==
next.e ||
next.vert_is_edge_pair) {
2581 next.fdata[best_dir].v_dst =
nullptr;
2586 next.fdata[best_dir].v_dst = v2_dst;
2587 next.fdata[best_dir].dst = v2_dst->
co;
2590 if (isect_curr_dirs) {
2592 const float *curr_orig = curr.sv->v_co_orig();
2593 const float3 &dst0 = prev.fdata[best_dir].dst;
2594 const float3 &dst1 = curr.fdata[best_dir].dst;
2595 const float3 &dst2 = dst;
2596 const float3 &dst3 =
next.fdata[best_dir].dst;
2665 const float isect_eps = FLT_EPSILON;
2667 dst0, dst1, dst2, dst3, isect_pair[0], isect_pair[1], isect_eps);
2669 if (isect_line_line != 0) {
2677 isect_line_line = 0;
2686 if (
UNLIKELY((len1 < isect_eps) || (len2 < isect_eps))) {
2687 isect_line_line = 0;
2690 for (
int isect_pass = 0; isect_pass < isect_line_line; isect_pass++) {
2691 const float3 isect_co = isect_pair[isect_pass] -
float3(curr_orig);
2692 if ((
math::dot(isect_co, plane_no_1) <= 0.0f) ||
2693 (
math::dot(isect_co, plane_no_2) <= 0.0f))
2696 isect_line_line = 0;
2704 if (isect_line_line != 0) {
2705 curr.fdata[best_dir].dst =
math::midpoint(isect_pair[0], isect_pair[1]);
2715 float3 iloc = curr.sv->td->iloc;
2716 if (curr.fdata[0].f) {
2717 curr.sv->dir_side[0] = curr.fdata[0].dst - iloc;
2719 if (curr.fdata[1].f) {
2720 curr.sv->dir_side[1] = curr.fdata[1].dst - iloc;
2722 curr.sv->edge_len =
math::distance(curr.sv->dir_side[0], curr.sv->dir_side[1]);
2723 curr.sv->loop_nr = loop_nr;
2725 if (i_prev != -1 && prev.i == i_prev) {
2739 *r_group_len = loop_nr;
Main * CTX_data_main(const bContext *C)
blender::Array< blender::float3 > BKE_crazyspace_get_mapped_editverts(Depsgraph *depsgraph, Object *obedit)
int BKE_crazyspace_get_first_deform_matrices_editbmesh(Depsgraph *depsgraph, Scene *, Object *, BMEditMesh *em, blender::Array< blender::float3x3, 0 > &deformmats, blender::Array< blender::float3, 0 > &deformcos)
void BKE_crazyspace_set_quats_editmesh(BMEditMesh *em, blender::Span< blender::float3 > origcos, blender::Span< blender::float3 > mappedcos, float(*quats)[4], bool use_select)
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
BMCustomDataCopyMap CustomData_bmesh_copy_map_calc(const CustomData &src, const CustomData &dst, eCustomDataMask mask_exclude=0)
bool CustomData_layer_has_math(const CustomData *data, int layer_n)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
bool CustomData_has_math(const CustomData *data)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
void BKE_editmesh_looptris_calc_with_partial_ex(BMEditMesh *em, BMPartialUpdate *bmpinfo, const BMeshCalcTessellation_Params *params)
void BKE_editmesh_looptris_calc(BMEditMesh *em)
void BKE_editmesh_looptris_and_normals_calc(BMEditMesh *em)
int BKE_modifiers_get_cage_index(const Scene *scene, Object *ob, int *r_lastPossibleCageIndex, bool is_virtual)
bool BKE_modifiers_is_correctable_deformed(const Scene *scene, Object *ob)
void BKE_scene_graph_evaluated_ensure(Depsgraph *depsgraph, Main *bmain)
#define BLI_array_alloca(arr, realsize)
#define BLI_assert_unreachable()
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
#define GHASH_ITER(gh_iter_, ghash_)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_ptr_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
BLI_LINKSTACK_*** wrapper macros for using a LinkNode to store a stack of pointers,...
#define BLI_LINKSTACK_PUSH(var, ptr)
#define BLI_LINKSTACK_DECLARE(var, type)
#define BLI_LINKSTACK_SIZE(var)
#define BLI_LINKSTACK_FREE(var)
#define BLI_LINKSTACK_INIT(var)
#define BLI_LINKSTACK_POP(var)
#define BLI_LINKSTACK_SWAP(var_a, var_b)
float geodesic_distance_propagate_across_triangle(const float v0[3], const float v1[3], const float v2[3], float dist1, float dist2)
int isect_line_line_epsilon_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3], float r_i1[3], float r_i2[3], float epsilon)
void axis_dominant_v3_to_m3(float r_mat[3][3], const float normal[3])
Normal to x,y matrix.
MINLINE int poly_to_tri_count(int poly_count, int corner_count)
float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3])
bool isect_line_plane_v3(float r_isect_co[3], const float l1[3], const float l2[3], const float plane_co[3], const float plane_no[3]) ATTR_WARN_UNUSED_RESULT
float dist_signed_squared_to_corner_v3v3v3(const float p[3], const float v1[3], const float v2[3], const float v3[3], const float axis_ref[3])
void mul_m3_v3(const float M[3][3], float r[3])
void pseudoinverse_m3_m3(float inverse[3][3], const float mat[3][3], float epsilon)
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void unit_m3(float m[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
#define PSEUDOINVERSE_EPSILON
bool invert_m3_m3(float inverse[3][3], const float mat[3][3])
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
#define mul_m3_series(...)
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
bool invert_m3(float mat[3][3])
void quat_to_mat3(float m[3][3], const float q[4])
MINLINE bool equals_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void project_plane_normalized_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
void copy_vn_i(int *array_tar, int size, int val)
MINLINE bool is_zero_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void zero_v3(float r[3])
float angle_v3v3v3(const float a[3], const float b[3], const float c[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE float normalize_v3(float n[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
#define BLI_MEMARENA_STD_BUFSIZE
MemArena * BLI_memarena_new(size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(2) ATTR_MALLOC
void BLI_memarena_free(MemArena *ma) ATTR_NONNULL(1)
void * BLI_memarena_alloc(MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2)
#define POINTER_OFFSET(v, ofs)
void DEG_id_tag_update(ID *id, unsigned int flags)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
@ UVCALC_TRANSFORM_CORRECT_SLIDE
@ UVCALC_TRANSFORM_CORRECT
@ UVCALC_TRANSFORM_CORRECT_KEEP_CONNECTED
@ V3D_AROUND_LOCAL_ORIGINS
bool EDBM_automerge_and_split(Object *obedit, bool split_edges, bool split_faces, bool update, char hflag, float dist)
bool EDBM_automerge(Object *obedit, bool update, char hflag, float dist)
void EDBM_selectmode_flush_ex(BMEditMesh *em, short selectmode)
void EDBM_verts_mirror_cache_begin_ex(BMEditMesh *em, int axis, bool use_self, bool use_select, bool respecthide, bool use_topology, float maxdist, int *r_index)
void ED_mesh_mirror_spatial_table_end(Object *ob)
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
#define BM_FACE_FIRST_LOOP(p)
void BM_elem_attrs_copy(BMesh *bm, const BMCustomDataCopyMap &map, const BMVert *src, BMVert *dst)
void BM_mesh_copy_init_customdata_all_layers(BMesh *bm_dst, BMesh *bm_src, const char htype, const BMAllocTemplate *allocsize)
BMFace * BM_face_copy(BMesh *bm_dst, const BMCustomDataCopyMap &cd_face_map, const BMCustomDataCopyMap &cd_loop_map, BMFace *f, const bool copy_verts, const bool copy_edges)
#define BM_elem_index_get(ele)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_set(ele, hflag, val)
#define BM_elem_index_set(ele, index)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
void BM_face_interp_multires_ex(BMesh *bm, BMFace *f_dst, const BMFace *f_src, const float f_dst_center[3], const float f_src_center[3], const int cd_loop_mdisp_offset)
void BM_vert_loop_groups_data_layer_merge(BMesh *bm, LinkNode *groups, const int layer_n)
void BM_vert_loop_groups_data_layer_merge_weights(BMesh *bm, LinkNode *groups, const int layer_n, const float *loop_weights)
void BM_loop_interp_from_face(BMesh *bm, BMLoop *l_dst, const BMFace *f_src, const bool do_vertex, const bool do_multires)
LinkNode * BM_vert_loop_groups_data_layer_create(BMesh *bm, BMVert *v, const int layer_n, const float *loop_weights, MemArena *arena)
int BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, const bool value)
Mesh Iter Flag Count.
int BM_iter_elem_count_flag(const char itype, void *data, const char hflag, const bool value)
Elem Iter Flag Count.
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
#define BM_iter_init(iter, bm, itype, data)
#define BM_ITER_ELEM_INDEX(ele, iter, data, itype, indexvar)
BMesh const char void * data
void BM_editselection_center(BMEditSelection *ese, float r_center[3])
void BM_editselection_plane(BMEditSelection *ese, float r_plane[3])
void BM_editselection_normal(BMEditSelection *ese, float r_normal[3])
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
const BMAllocTemplate bm_mesh_allocsize_default
void bmesh_edit_begin(BMesh *, BMOpTypeFlag)
BMesh Begin Edit.
void BM_mesh_free(BMesh *bm)
BMesh Free Mesh.
void BM_mesh_elem_table_ensure(BMesh *bm, const char htype)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
void bmesh_edit_end(BMesh *bm, BMOpTypeFlag type_flag)
BMesh End Edit.
BMesh * BM_mesh_create(const BMAllocTemplate *allocsize, const BMeshCreateParams *params)
BMesh Make Mesh.
BLI_INLINE BMVert * BM_vert_at_index(BMesh *bm, const int index)
void BM_mesh_normals_update_with_partial_ex(BMesh *, const BMPartialUpdate *bmpinfo, const BMeshNormalsUpdate_Params *params)
BMPartialUpdate * BM_mesh_partial_create_from_verts_group_single(BMesh &bm, const BMPartialUpdate_Params ¶ms, const BitSpan verts_mask, const int verts_mask_count)
BMPartialUpdate * BM_mesh_partial_create_from_verts_group_multi(BMesh &bm, const BMPartialUpdate_Params ¶ms, const Span< int > verts_group, const int verts_group_count)
void BM_mesh_partial_destroy(BMPartialUpdate *bmpinfo)
BMPartialUpdate * BM_mesh_partial_create_from_verts(BMesh &bm, const BMPartialUpdate_Params ¶ms, const BitSpan verts_mask, const int verts_mask_count)
@ BMO_OPTYPE_FLAG_UNTAN_MULTIRES
bool BM_vert_calc_normal_ex(const BMVert *v, const char hflag, float r_no[3])
void BM_face_calc_center_median(const BMFace *f, float r_cent[3])
int BM_mesh_calc_face_groups(BMesh *bm, int *r_groups_array, int(**r_group_index)[2], BMLoopFilterFunc filter_fn, BMLoopPairFilterFunc filter_pair_fn, void *user_data, const char hflag_test, const char htype_step)
float BM_vert_calc_shell_factor_ex(const BMVert *v, const float no[3], const char hflag)
BMLoop * BM_loop_find_next_nodouble(BMLoop *l, BMLoop *l_stop, const float eps_sq)
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
void BM_loop_calc_face_direction(const BMLoop *l, float r_dir[3])
BM_loop_calc_face_direction.
int BM_mesh_calc_edge_groups(BMesh *bm, int *r_groups_array, int(**r_group_index)[2], BMVertFilterFunc filter_fn, void *user_data, const char hflag_test)
bool BM_vert_is_edge_pair(const BMVert *v)
bool BM_vert_is_boundary(const BMVert *v)
BMLoop * BM_loop_find_prev_nodouble(BMLoop *l, BMLoop *l_stop, const float eps_sq)
BLI_INLINE bool BM_edge_is_manifold(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_edge_is_boundary(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) 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 DBVT_INLINE btScalar size(const btDbvtVolume &a)
IndexRange index_range() const
void append(const T &value)
void reserve(const int64_t min_capacity)
Span< T > as_span() const
void resize(const int64_t new_size_in_bits, const bool value=false)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
bool shape_key_report_if_locked(const Object *obedit, ReportList *reports)
T distance(const T &a, const T &b)
QuaternionBase< T > normalize_and_get_length(const QuaternionBase< T > &q, T &out_length)
T dot(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
T midpoint(const T &a, const T &b)
AxisSigned cross(const AxisSigned a, const AxisSigned b)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
VecBase< int32_t, 2 > int2
VecBase< float, 3 > float3
blender::Array< std::array< BMLoop *, 3 > > looptris
struct BMLoop * radial_next
struct ToolSettings * toolsettings