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;
587 ((l_prev = l_prev->
prev) !=
l->next)))
594 ((l_next = l_next->
next) !=
l->prev)))
600 if (co_prev_ok && co_next_ok) {
602 v->co,
UNPACK3(v_proj), v_proj_axis);
604 loop_weights[j] = (dist >= 0.0f) ? 1.0f : ((dist <= -
eps) ? 0.0f : (1.0f + (dist /
eps)));
605 if (
UNLIKELY(!isfinite(loop_weights[j]))) {
606 loop_weights[j] = 0.0f;
610 loop_weights[j] = 0.0f;
618 if (do_loop_weight) {
638 const bool update_loop_mdisps = is_moved && do_loop_mdisps && (tcld->
cd_loop_mdisp_offset != -1);
639 if (update_loop_mdisps) {
640 float(*faces_center)[3] =
static_cast<float(*)[3]
>(
BLI_array_alloca(faces_center, l_num));
649 float f_copy_center[3];
660 faces_center[j_other],
672 if (tcld ==
nullptr) {
682 if (use_merge_group) {
691 if (use_merge_group) {
723 BMLoop *l_iter, *l_first, *l_copy;
729 l_copy = l_copy->
next;
730 }
while ((l_iter = l_iter->
next) != l_first);
742 const bool calc_single_islands,
743 const bool calc_island_center,
744 const bool calc_island_axismtx,
755 int *groups_array =
nullptr;
756 int(*group_index)[2] =
nullptr;
758 bool has_only_single_islands =
bm->totedgesel == 0 &&
bm->totfacesel == 0;
759 if (has_only_single_islands && !calc_single_islands) {
763 data.island_vert_map =
static_cast<int *
>(
770 if (!has_only_single_islands) {
789 if (calc_island_center) {
790 data.center =
static_cast<float(*)[3]
>(
794 if (calc_island_axismtx) {
795 data.axismtx =
static_cast<float(*)[3][3]
>(
802 ele_array = (htype ==
BM_FACE) ? (
void **)
bm->ftable : (
void **)
bm->etable;
807 for (
i = 0;
i <
data.island_tot;
i++) {
810 const int fg_sta = group_index[
i][0];
811 const int fg_len = group_index[
i][1];
812 float co[3], no[3], tangent[3];
825 for (j = 0; j < fg_len; j++) {
826 ese.
ele =
static_cast<BMElem *
>(ele_array[groups_array[fg_sta + j]]);
835 float tmp_no[3], tmp_tangent[3];
872 if (calc_single_islands) {
875 int group_tot_single = 0;
879 group_tot_single += 1;
883 if (group_tot_single != 0) {
884 if (calc_island_center) {
886 data.center,
sizeof(*
data.center) * (
data.island_tot + group_tot_single)));
888 if (calc_island_axismtx) {
890 data.axismtx,
sizeof(*
data.axismtx) * (
data.island_tot + group_tot_single)));
895 data.island_vert_map[
i] =
data.island_tot;
909 data.island_tot += 1;
915 *r_island_data =
data;
920 if (island_data->
center) {
943 const float mtx[3][3])
951 if (dists[i0] <= dists[i1]) {
961 if (dists[i0] <= dists[i2]) {
965 float vm0[3], vm1[3], vm2[3];
978 dist0 = dists[i1] +
len_v3(vec);
981 if (dist0 < dists[i0]) {
983 if (index !=
nullptr) {
984 index[i0] = index[i1];
996 if (edge->
l ==
nullptr) {
1012 const float mtx[3][3],
1039 if (index !=
nullptr) {
1045 if (index !=
nullptr) {
1092 if (dists[i1] > dists[i2]) {
1132 for (
BMLoop *l_other =
l->next->next; l_other !=
l; l_other = l_other->next) {
1133 BMVert *v_other = l_other->v;
1159 for (
LinkNode *lnk = queue_next; lnk; lnk = lnk->
next) {
1182#define TRANSFORM_MAXDIST_MIRROR 0.00002f
1186 if (quadrant[0] && ((co[0] * quadrant[0]) < -epsilon)) {
1189 if (quadrant[1] && ((co[1] * quadrant[1]) < -epsilon)) {
1192 if (quadrant[2] && ((co[2] * quadrant[2]) < -epsilon)) {
1199 const bool use_select,
1200 const bool use_topology,
1201 const bool mirror_axis[3],
1209 int i,
flag, totvert =
bm->totvert;
1213 float select_sum[3] = {0};
1226 for (
int a = 0; a < 3; a++) {
1227 if (mirror_axis[a]) {
1228 quadrant[a] = select_sum[a] >= 0.0f ? 1 : -1;
1235 uint mirror_elem_len = 0;
1236 int *index[3] = {
nullptr,
nullptr,
nullptr};
1237 bool is_single_mirror_axis = (mirror_axis[0] + mirror_axis[1] + mirror_axis[2]) == 1;
1238 bool test_selected_only = use_select && is_single_mirror_axis;
1239 for (
int a = 0; a < 3; a++) {
1240 if (!mirror_axis[a]) {
1244 index[a] =
static_cast<int *
>(
MEM_mallocN(totvert *
sizeof(*index[a]), __func__));
1250 int i_mirr = index[a][
i];
1263 if (vert_map[i_mirr].
flag != 0) {
1280 if (!mirror_elem_len) {
1284 else if (!is_single_mirror_axis) {
1286 for (
int a = 0; a < 3; a++) {
1287 if (!mirror_axis[a]) {
1292 for (
i = 0;
i < totvert;
i++) {
1293 int i_mirr = index[a][
i];
1297 if (vert_map[
i].index != -1 && !(vert_map[
i].
flag &
flag)) {
1298 if (vert_map[i_mirr].index == -1) {
1312 r_mirror_data->
vert_map = vert_map;
1334 float(*quats)[4] =
nullptr;
1349 t->
depsgraph, scene_eval, obedit_eval, em_eval, r_crazyspace_data->
defmats, defcos);
1357 if ((totleft > 0) || (totleft == -1))
1364 quats =
static_cast<float(*)[4]
>(
1369 r_crazyspace_data->
quats = quats;
1373 const float smtx[3][3],
1374 const float defmat[3][3],
1375 const float quat[4],
1379 if (quat || defmat) {
1380 float mat[3][3], qmat[3][3], imat[3][3];
1410 if (r_crazyspace_data->
quats) {
1422 const int island_index,
1423 const float iloc[3],
1426 if (island_data->
center && island_index != -1) {
1441 const int island_index)
1464 if ((island_index != -1) && island_data->
axismtx) {
1495 float mtx[3][3], smtx[3][3];
1530 data_len =
bm->totvertsel;
1533 if (data_len == 0) {
1549 if (is_island_center) {
1556 const bool calc_island_center = !is_snap_rotate;
1562 em, calc_single_islands, calc_island_center, calc_island_axismtx, &island_data);
1565 copy_m3_m4(mtx, tc->obedit->object_to_world().ptr());
1572 int *dists_index =
nullptr;
1573 float *dists =
nullptr;
1576 if (is_island_center) {
1583 if (tc->use_mirror_axis_any) {
1586 const bool mirror_axis[3] = {
1587 bool(tc->use_mirror_axis_x), bool(tc->use_mirror_axis_y), bool(tc->use_mirror_axis_z)};
1589 em, use_select, use_topology, mirror_axis, &mirror_data);
1611 tc->data_len = data_len;
1628 int island_index = -1;
1630 const int connected_index = (dists_index && dists_index[a] != -1) ? dists_index[a] : a;
1642 td_mirror->
extra = eve;
1643 td_mirror->
loc = eve->
co;
1666 tob->
dist = dists[a];
1677 !crazyspace_data.
defmats.is_empty() ? crazyspace_data.
defmats[a].ptr() :
nullptr,
1679 crazyspace_data.
quats[a] :
1683 if (tc->use_mirror_axis_any) {
1715 if (looptri_is_dirty) {
1735 if (pupdate->
cache) {
1766 return pupdate->
cache;
1770 pupdate->
cache =
nullptr;
1779 int verts_group_count = 0;
1782 int verts_mask_count = 0;
1790 if (td->
factor == 0.0f) {
1798 verts_group[v_index] = -1;
1802 verts_group[v_index] = 1;
1809 verts_mask_count += 1;
1819 if (verts_group[v_mirr_index] == 0 &&
equals_v3v3(td_mirror->
loc, td_mirror->
iloc)) {
1829 if (verts_group[v_mirr_index] == -1) {
1830 verts_group[v_mirr_other_index] = -1;
1837 verts_mask_count += 1;
1846 if (td->
factor == 0.0f) {
1852 verts_mask[v_index].set();
1853 verts_mask_count += 1;
1866 verts_mask[v_mirr_other_index].set();
1867 verts_mask_count += 1;
1871 switch (partial_type) {
1874 params.do_tessellate =
true;
1875 params.do_normals =
true;
1877 *em->
bm,
params, verts_mask, verts_mask_count);
1882 params.do_tessellate =
true;
1883 params.do_normals =
true;
1886 *em->
bm,
params, verts_group, verts_group_count) :
1888 *em->
bm,
params, verts_mask, verts_mask_count));
1899 return pupdate->
cache;
1957 r_partial_state->
for_normals = partial_for_normals;
1993 params.face_normals =
true;
2004 params.face_normals = face_normals;
2043 td_mirror->
loc[0] *= -1;
2046 td_mirror->
loc[1] *= -1;
2049 td_mirror->
loc[2] *= -1;
2059 if (!is_canceling) {
2107 if (use_automerge) {
2112 bool has_face_sel = (
bm->totfacesel != 0);
2114 if (tc->use_mirror_axis_any) {
2120 for (
int i = tc->data_mirror_len;
i--; td_mirror++) {
2163 int td_selected_len = 0;
2172 const int size_prev = r_loc_dst_buffer.
size();
2186 r_loc_dst_buffer.
append(v_other->
co);
2203 int size = sv.co_link_curr;
2204 sv.co_link_orig_3d = r_loc_dst_buffer.
as_span().slice(start,
size);
2205 sv.co_link_curr = 0;
2242 if ((fac > -FLT_EPSILON) && (fac < 1.0f + FLT_EPSILON)) {
2247 if (dist_sq_test < dist_sq_best) {
2249 dist_sq_best = dist_sq_test;
2254 }
while ((l_iter = l_iter->
next) != l_last);
2286 int td_selected_len = 0;
2291 bool found_invalid_edge_selection =
false;
2296 if (numsel == 0 || numsel > 2) {
2298 found_invalid_edge_selection =
true;
2304 if (found_invalid_edge_selection) {
2354 if (
ELEM(-1, td_index_1, td_index_2)) {
2358 int slot_1 = int(td_connected[td_index_1][0] != -1);
2359 int slot_2 = int(td_connected[td_index_2][0] != -1);
2361 td_connected[td_index_1][slot_1] = td_index_2;
2362 td_connected[td_index_2][slot_2] = td_index_1;
2376 int i_prev = td_connected[
i][1];
2377 while (!
ELEM(i_prev, -1,
i)) {
2378 int tmp = td_connected[i_prev][0] != i_curr ? td_connected[i_prev][0] :
2379 td_connected[i_prev][1];
2393 struct SlideTempDataMesh {
2403 bool vert_is_edge_pair;
2412 int find_best_dir(
const SlideTempDataMesh *curr_side_other,
2416 bool *r_do_isect_curr_dirs)
const
2418 *r_do_isect_curr_dirs =
false;
2420 if (f_curr == curr_side_other->fdata[0].f || v_dst == curr_side_other->fdata[0].v_dst) {
2424 if (f_curr == curr_side_other->fdata[1].f || v_dst == curr_side_other->fdata[1].v_dst) {
2428 if (curr_side_other->fdata[0].f || curr_side_other->fdata[1].f) {
2433 while (l_other->
f != l_edge->
f) {
2434 if (l_other->
f == curr_side_other->fdata[0].f) {
2438 if (l_other->
f == curr_side_other->fdata[1].f) {
2442 l_other = (l_other->
v == this->v ? l_other->
prev : l_other->
next)->radial_next;
2445 if (best_dir != -1) {
2446 *r_do_isect_curr_dirs =
true;
2451 if (
ELEM(
nullptr, this->fdata[0].f, this->fdata[1].f)) {
2452 return int(this->fdata[0].f !=
nullptr);
2460 *r_do_isect_curr_dirs =
true;
2467 if (is_boundary_0 && !is_boundary_1) {
2471 if (is_boundary_1 && !is_boundary_0) {
2478 float3 dir_curr = dst - src;
2483 return int(dot0 < dot1);
2485 } prev = {}, curr = {},
next = {}, next_next = {}, tmp = {};
2487 next.i = td_connected[i_curr][0] != i_prev ? td_connected[i_curr][0] : td_connected[i_curr][1];
2496 curr.sv = &r_sv[curr.i];
2497 curr.v =
static_cast<BMVert *
>(curr.sv->td->extra);
2507 while (curr.i != -1) {
2509 next_next.i = td_connected[
next.i][0] != curr.i ? td_connected[
next.i][0] :
2510 td_connected[
next.i][1];
2511 if (next_next.i != -1) {
2512 next_next.sv = &r_sv[next_next.i];
2513 next_next.v =
static_cast<BMVert *
>(next_next.sv->td->extra);
2527 if (
l->v == curr.v) {
2530 l_edge_next = l2->
e;
2531 v1_dst = l1->
prev->
v;
2532 v2_dst = l2->
next->
v;
2537 l_edge_next = l2->
prev->
e;
2538 v1_dst = l1->
next->
v;
2539 v2_dst = l2->
prev->
v;
2546 bool isect_curr_dirs =
false;
2549 int best_dir = curr.find_best_dir(&tmp, f_curr, l1, v1_dst, &isect_curr_dirs);
2551 if (curr.fdata[best_dir].f ==
nullptr) {
2552 curr.fdata[best_dir].f = f_curr;
2553 if (curr.vert_is_edge_pair) {
2557 curr.fdata[best_dir].v_dst = v1_dst;
2558 curr.fdata[best_dir].dst = v1_dst->
co;
2563 next.fdata[best_dir].f = f_curr;
2564 if (l_edge_next ==
next.e ||
next.vert_is_edge_pair) {
2566 next.fdata[best_dir].v_dst =
nullptr;
2571 next.fdata[best_dir].v_dst = v2_dst;
2572 next.fdata[best_dir].dst = v2_dst->
co;
2575 if (isect_curr_dirs) {
2577 const float *curr_orig = curr.sv->v_co_orig();
2578 const float3 &dst0 = prev.fdata[best_dir].dst;
2579 const float3 &dst1 = curr.fdata[best_dir].dst;
2580 const float3 &dst2 = dst;
2581 const float3 &dst3 =
next.fdata[best_dir].dst;
2650 const float isect_eps = FLT_EPSILON;
2652 dst0, dst1, dst2, dst3, isect_pair[0], isect_pair[1], isect_eps);
2654 if (isect_line_line != 0) {
2662 isect_line_line = 0;
2671 if (
UNLIKELY((len1 < isect_eps) || (len2 < isect_eps))) {
2672 isect_line_line = 0;
2675 for (
int isect_pass = 0; isect_pass < isect_line_line; isect_pass++) {
2676 const float3 isect_co = isect_pair[isect_pass] -
float3(curr_orig);
2677 if ((
math::dot(isect_co, plane_no_1) <= 0.0f) ||
2678 (
math::dot(isect_co, plane_no_2) <= 0.0f))
2681 isect_line_line = 0;
2689 if (isect_line_line != 0) {
2690 curr.fdata[best_dir].dst =
math::midpoint(isect_pair[0], isect_pair[1]);
2700 float3 iloc = curr.sv->td->iloc;
2701 if (curr.fdata[0].f) {
2702 curr.sv->dir_side[0] = curr.fdata[0].dst - iloc;
2704 if (curr.fdata[1].f) {
2705 curr.sv->dir_side[1] = curr.fdata[1].dst - iloc;
2707 curr.sv->edge_len =
math::distance(curr.sv->dir_side[0], curr.sv->dir_side[1]);
2708 curr.sv->loop_nr = loop_nr;
2710 if (i_prev != -1 && prev.i == i_prev) {
2724 *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
void EDBM_automerge_and_split(Object *obedit, bool split_edges, bool split_faces, bool update, char hflag, float dist)
void 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 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)
#define MEM_reallocN(vmemh, len)
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