27 # define _USE_MATH_DEFINES
75 #define USE_NET_ISLAND_CONNECT
77 #define KMAXDIST (10 * U.dpi_fac)
82 #define KNIFE_FLT_EPS 0.00001f
83 #define KNIFE_FLT_EPS_SQUARED (KNIFE_FLT_EPS * KNIFE_FLT_EPS)
84 #define KNIFE_FLT_EPSBIG 0.0005f
86 #define KNIFE_FLT_EPS_PX_VERT 0.5f
87 #define KNIFE_FLT_EPS_PX_EDGE 0.05f
88 #define KNIFE_FLT_EPS_PX_FACE 0.05f
174 #ifdef USE_NET_ISLAND_CONNECT
276 (
const float(*)[4])kcd->
projmat, planes[2], planes[0], planes[3], planes[1],
NULL,
NULL);
282 float lambda_best[2] = {-FLT_MAX, FLT_MAX};
290 float curr_cage_adjust[3];
302 for (i = 0; i < 4; i++) {
307 if (lambda_test < 0.0f) {
308 if (lambda_test > lambda_best[0]) {
310 lambda_best[0] = lambda_test;
314 if (lambda_test < lambda_best[1]) {
316 lambda_best[1] = lambda_test;
361 if (kcd->
mode == MODE_DRAGGING) {
418 int i, snapped_verts_count, other_verts_count;
427 for (i = 0, snapped_verts_count = 0, other_verts_count = 0; i < kcd->
totlinehit; i++, lh++) {
443 if (snapped_verts_count > 0) {
451 if (other_verts_count > 0) {
530 int available_len =
sizeof(buf);
532 #define WM_MODALKEY(_id) \
533 WM_modalkeymap_operator_items_to_string_buf( \
534 op->type, (_id), true, UI_MAX_SHORTCUT_STR, &available_len, &p)
538 TIP_(
"%s: confirm, %s: cancel, "
539 "%s: start/define cut, %s: close cut, %s: new cut, "
540 "%s: midpoint snap (%s), %s: ignore snap (%s), "
541 "%s: angle constraint (%s), %s: cut through (%s), "
578 float r_origin_ofs[3])
591 bool v1_inside, v2_inside;
592 bool v1_inface, v2_inface;
595 if (!f || !
v1 || !
v2) {
608 v1_inface = (l1 !=
NULL);
609 v2_inface = (l2 !=
NULL);
614 if ((v1_inface && v2_inside) || (v2_inface && v1_inside) || (v1_inside && v2_inside)) {
618 if (v1_inface && v2_inface) {
659 if (r_kfe || ele_test ==
NULL) {
660 if (kfv->
v ==
NULL) {
675 if (ele_test ==
NULL) {
682 if (ele_test ==
NULL) {
732 for (ref1 = lb->
first; ref1; ref1 = ref1->
next) {
733 if (ref1->
ref == ref) {
771 for (ref1 = faces1->
first; ref1; ref1 = ref1->
next) {
772 for (ref2 = faces2->
first; ref2; ref2 = ref2->
next) {
773 if (ref1->
ref == ref2->
ref) {
886 const float cageco[3],
893 newkfe->
v1 = kfe->
v1;
913 kfe->
v1 = newkfe->
v2;
944 float origin[3], origin_ofs[3];
981 if (lh1->
l < lh2->
l) {
984 if (lh1->
l > lh2->
l) {
987 if (lh1->
m < lh2->
m) {
990 if (lh1->
m > lh2->
m) {
993 if (lh1->
v < lh2->
v) {
996 if (lh1->
v > lh2->
v) {
1009 bool is_double =
false;
1023 for (
int i = 0; i < n; i++) {
1026 for (
int j = i - 1; j >= 0; j--) {
1033 if (lhi->
kfe == lhj->
kfe) {
1038 for (
int j = i + 1; j < n; j++) {
1044 if ((lhj->
kfe && (lhi->
kfe == lhj->
kfe)) || (lhi->
v == lhj->
v)) {
1059 if (lhj->
l == -1.0f) {
1064 if (lhi->
l == -1.0f) {
1066 memcpy(&linehits[i], &linehits[j],
sizeof(
KnifeLineHit));
1070 memcpy(&linehits[i + 1], &linehits[j],
sizeof(
KnifeLineHit));
1105 if (lh->
v && lh->
v->
v) {
1112 else if ((lh->
kfe && lh->
kfe->
e)) {
1131 if ((lh1->
v && lh1->
v == lh2->
v) || (lh1->
kfe && lh1->
kfe == lh2->
kfe)) {
1136 if ((lh1->
v && lh2->
v) && (lh1->
v->
v && lh2->
v && lh2->
v->
v) &&
1149 if ((lh1->
v && !lh1->
kfe) && (lh2->
v && !lh2->
kfe)) {
1162 else if (lh1->
kfe) {
1178 else if (lh2->
kfe) {
1211 for (
r = hits->
first;
r->next;
r =
r->next) {
1232 for (ref = kfedges->
first; ref; ref = ref->
next) {
1233 bool is_new_edge =
false;
1236 if (kfe->
e ==
NULL) {
1237 if (kfe->
v1->
v && kfe->
v2->
v) {
1268 kfe_array[i] = is_new_edge ? kfe : 0;
1269 edge_array[i] = kfe->
e;
1275 const int edge_array_len_orig = i;
1278 #ifdef USE_NET_ISLAND_CONNECT
1279 uint edge_array_holes_len;
1280 BMEdge **edge_array_holes;
1288 &edge_array_holes_len)) {
1290 for (i = edge_array_len; i < edge_array_holes_len; i++) {
1295 edge_array_len = edge_array_holes_len;
1296 edge_array = edge_array_holes;
1312 for (i = 0; i < edge_array_len_orig; i++) {
1316 kfe_array[i]->
e =
NULL;
1321 #ifdef USE_NET_ISLAND_CONNECT
1333 const float *co = co_p;
1417 for (ref = list->
first; ref; ref = ref->
next) {
1541 BLI_assert(index >= 0 && index < kcd->em->tottri);
1543 for (i = index - 1; i >= 0; i--) {
1579 const float face_tol_sq,
1581 float hit_cageco[3])
1585 float tri_norm[3], tri_plane[4];
1586 float se1[2], se2[2];
1599 for (; tri_i < tottri; tri_i++) {
1600 const float *lv1, *lv2, *lv3;
1601 float ray_tri_uv[2];
1604 if (tri[0]->f != f) {
1625 for (ref = list->
first; ref; ref = ref->
next) {
1630 if (d < face_tol_sq) {
1669 const float *co11, *co12, *co21, *co22;
1745 float view[3], p_ofs[3];
1763 float view_clip[2][3];
1774 dist =
len_v3v3(p_ofs, view_clip[1]);
1829 float v1[3],
v2[3], v3[3], v4[3], s1[2], s2[2];
1844 float s[2], se1[2], se2[2], sint[2];
1846 float d1, d2, lambda;
1847 float vert_tol, vert_tol_sq;
1848 float line_tol, line_tol_sq;
1849 float face_tol, face_tol_sq;
1903 float v1_v2[3], v1_v3[3];
1924 for (i = 0,
result = results; i < tot; i++,
result++) {
1941 for (ref = list->
first; ref; ref = ref->
next) {
1968 vert_tol = line_tol = face_tol = 0.5f;
1971 vert_tol_sq = vert_tol * vert_tol;
1972 line_tol_sq = line_tol * line_tol;
1973 face_tol_sq = face_tol * face_tol;
1982 bool kfv_is_in_cut =
false;
1989 kfv_is_in_cut =
true;
1994 if ((d <= vert_tol_sq) &&
1996 kfv_is_in_cut =
true;
2000 if (kfv_is_in_cut) {
2001 memset(&hit, 0,
sizeof(hit));
2048 if (isect_kind == -1) {
2062 if (isect_kind == 1) {
2065 if (!(d1 <= line_tol || d2 <= line_tol ||
fabsf(d1 - d2) <= line_tol)) {
2066 float p_cage[3], p_cage_tmp[3];
2075 memset(&hit, 0,
sizeof(hit));
2099 if (use_hit_prev || use_hit_curr) {
2102 float p[3], p_cage[3];
2106 memset(&hit, 0,
sizeof(hit));
2118 memset(&hit, 0,
sizeof(hit));
2178 float origin_ofs[3];
2179 float ray[3], ray_normal[3];
2229 const float cageco[3])
2231 const float radius_sq = radius * radius;
2241 for (ref = list->
first; ref; ref = ref->
next) {
2245 for (i = 0; i < 2; i++) {
2252 if (dis_sq < radius_sq) {
2284 return density ?
min_ff(maxsize / ((
float)density * 0.5f), maxsize) : maxsize;
2291 const float kfv1_sco[2],
2292 const float kfv2_sco[2],
2307 if (dis_sq < *r_dist_sq) {
2308 *r_dist_sq = dis_sq;
2327 float v1_ss[3], v2_ss[3];
2358 const float maxdist_sq = maxdist * maxdist;
2363 float dis_sq, curdis_sq = maxdist_sq;
2369 for (ref = list->
first; ref; ref = ref->
next) {
2371 float kfv1_sco[2], kfv2_sco[2], test_cagep[3];
2387 if (dis_sq < curdis_sq) {
2451 const float maxdist_sq = maxdist * maxdist;
2453 float cur_kfv_sco[2];
2454 float dis_sq, curdis_sq = FLT_MAX;
2458 for (
int i = 0; i < 2; i++) {
2474 if (dis_sq < curdis_sq && dis_sq < maxdist_sq) {
2499 static float snap_v2_angle(
float r[2],
const float v[2],
const float v_ref[2],
float angle_snap)
2503 float angle, angle_delta;
2509 angle_delta = (roundf(
angle / angle_snap) * angle_snap) -
angle;
2513 return angle + angle_delta;
2519 const float dvec_ref[2] = {0.0f, 1.0f};
2520 float dvec[2], dvec_snap[2];
2638 const bool only_select,
2639 const bool cut_through,
2640 const bool is_interactive)
2664 #ifdef USE_NET_ISLAND_CONNECT
2691 if (is_interactive) {
2724 #ifdef USE_NET_ISLAND_CONNECT
2763 float origin_ofs[3];
2776 if (kcd->
mode == MODE_DRAGGING) {
2794 const float mval[2] = {
UNPACK2(mval_i)};
2871 bool do_refresh =
false;
2884 if (kcd->
mode == MODE_PANNING) {
2890 switch (event->
val) {
2951 kcd->
mode = MODE_IDLE;
2958 if (kcd->
mode == MODE_DRAGGING) {
2961 else if (kcd->
mode != MODE_PANNING) {
2963 kcd->
mode = MODE_DRAGGING;
2985 if (kcd->
mode == MODE_DRAGGING) {
3003 kcd->
mode = MODE_IDLE;
3008 if (kcd->
mode != MODE_PANNING) {
3010 kcd->
mode = MODE_PANNING;
3022 switch (event->
type) {
3031 if (kcd->
mode != MODE_PANNING) {
3045 if (kcd->
mode == MODE_DRAGGING) {
3092 if (wait_for_input ==
false) {
3112 ot->
name =
"Knife Topology Tool";
3128 "use_occlude_geometry",
3131 "Only cut the front most geometry");
3173 const bool only_select =
false;
3174 const bool is_interactive =
false;
3199 for (i = 0; i < mval_tot; i++) {
3203 kcd->
mode = MODE_DRAGGING;
3210 kcd->
mode = MODE_IDLE;
3222 float projmat[4][4];
3237 #define F_ISECT_IS_UNKNOWN(f) BM_elem_flag_test(BM_FACE_FIRST_LOOP(f), BM_ELEM_TAG)
3238 #define F_ISECT_SET_UNKNOWN(f) BM_elem_flag_enable(BM_FACE_FIRST_LOOP(f), BM_ELEM_TAG)
3239 #define F_ISECT_SET_OUTSIDE(f) BM_elem_flag_disable(BM_FACE_FIRST_LOOP(f), BM_ELEM_TAG)
3255 float cent[3], cent_ss[2];
3268 keep_search =
false;
3274 BMLoop *l_iter = l_first;
3281 if (l_radial_iter != l_iter) {
3286 }
while ((l_radial_iter = l_radial_iter->
radial_next) != l_iter &&
3290 }
while ((l_iter = l_iter->
next) != l_first && (found ==
false));
3293 float cent[3], cent_ss[2];
3308 }
while (keep_search);
3310 #undef F_ISECT_IS_UNKNOWN
3311 #undef F_ISECT_SET_UNKNOWN
3312 #undef F_ISECT_SET_OUTSIDE
typedef float(TangentPoint)[2]
struct Scene * CTX_data_scene(const bContext *C)
struct Object * CTX_data_edit_object(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
float(* BKE_editmesh_vert_coords_alloc(struct Depsgraph *depsgraph, struct BMEditMesh *em, struct Scene *scene, struct Object *ob, int *r_vert_len))[3]
BMEditMesh * BKE_editmesh_from_object(struct Object *ob)
Return the BMEditMesh for a given object.
struct BMFace * BKE_bmbvh_ray_cast(BMBVHTree *tree, const float co[3], const float dir[3], const float radius, float *r_dist, float r_hitout[3], float r_cagehit[3])
struct BVHTree * BKE_bmbvh_tree_get(BMBVHTree *tree)
struct BMFace * BKE_bmbvh_ray_cast_filter(BMBVHTree *tree, const float co[3], const float dir[3], const float radius, float *r_dist, float r_hitout[3], float r_cagehit[3], BMBVHTree_FaceFilter filter_cb, void *filter_userdata)
void BKE_bmbvh_free(BMBVHTree *tree)
BMBVHTree * BKE_bmbvh_new_from_editmesh(struct BMEditMesh *em, int flag, const float(*cos_cage)[3], const bool cos_cage_free)
void BKE_report(ReportList *reports, ReportType type, const char *message)
#define BLI_array_alloca(arr, realsize)
A (mainly) macro array library.
#define BLI_array_append(arr, item)
#define BLI_array_declare(arr)
#define BLI_array_len(arr)
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
unsigned int BLI_gset_len(GSet *gs) ATTR_WARN_UNUSED_RESULT
#define GHASH_ITER(gh_iter_, ghash_)
GSet * BLI_gset_ptr_new(const char *info)
void BLI_gset_clear(GSet *gs, GSetKeyFreeFP keyfreefp)
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_gset_add(GSet *gs, void *key)
void * BLI_ghash_lookup(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
int * BLI_bvhtree_intersect_plane(BVHTree *tree, float plane[4], uint *r_intersect_tot)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
int BLI_listbase_count_at_most(const struct ListBase *listbase, const int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_INLINE bool BLI_listbase_is_single(const struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void BLI_listbase_sort_r(ListBase *listbase, int(*cmp)(void *, const void *, const void *), void *thunk) ATTR_NONNULL(1
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define BLI_ASSERT_UNIT_V2(v)
MINLINE float min_ff(float a, float b)
void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3])
int isect_line_line_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 dist_squared_to_plane_v3(const float p[3], const float plane[4])
void transform_point_by_seg_v3(float p_dst[3], const float p_src[3], const float l_dst_p1[3], const float l_dst_p2[3], const float l_src_p1[3], const float l_src_p2[3])
bool isect_point_poly_v2(const float pt[2], const float verts[][2], const unsigned int nr, const bool use_holes)
void closest_to_line_segment_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2])
float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2])
int isect_seg_seg_v2_point_ex(const float v0[2], const float v1[2], const float v2[2], const float v3[2], const float endpoint_bias, float vi[2])
float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3])
int isect_line_line_v2_point(const float v0[2], const float v1[2], const float v2[2], const float v3[2], float r_vi[2])
void planes_from_projmat(const float mat[4][4], float left[4], float right[4], float top[4], float bottom[4], float near[4], float far[4])
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
bool isect_ray_tri_epsilon_v3(const float ray_origin[3], const float ray_direction[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float epsilon)
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
bool clip_segment_v3_plane_n(const float p1[3], const float p2[3], const float plane_array[][4], const int plane_tot, float r_p1[3], float r_p2[3])
bool isect_ray_plane_v3(const float ray_origin[3], const float ray_direction[3], const float plane[4], float *r_lambda, const bool clip)
float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2])
void mul_project_m4_v3(const float M[4][4], float vec[3])
void mul_v3_project_m4_v3(float r[3], const float mat[4][4], const float vec[3])
void mul_v2_m2v2(float r[2], const float M[2][2], const float v[2])
void invert_m4_m4_safe_ortho(float Ainv[4][4], const float A[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void mul_m4_v3(const float M[4][4], float r[3])
void mul_v3_mat3_m4v3(float r[3], const float M[4][4], const float v[3])
void angle_to_mat2(float R[2][2], const float angle)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void minmax_v3v3_v3(float min[3], float max[3], const float vec[3])
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
void minmax_v3v3_v3_array(float r_min[3], float r_max[3], const float(*vec_arr)[3], int nbr)
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3(float r[3], const float a[3])
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_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_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])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float dot_m4_v3_row_z(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT
float angle_signed_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
MINLINE bool equals_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f)
MINLINE bool is_zero_v2(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE float normalize_v2_v2(float r[2], const float a[2])
void interp_v3_v3v3v3_uv(float p[3], const float v1[3], const float v2[3], const float v3[3], const float uv[2])
void BLI_memarena_free(struct MemArena *ma) ATTR_NONNULL(1)
void * BLI_memarena_alloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2)
void BLI_memarena_clear(MemArena *ma) ATTR_NONNULL(1)
struct MemArena * BLI_memarena_new(const size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2) ATTR_MALLOC
void * BLI_mempool_calloc(BLI_mempool *pool) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_mempool_iternew(BLI_mempool *pool, BLI_mempool_iter *iter) ATTR_NONNULL()
void * BLI_mempool_iterstep(BLI_mempool_iter *iter) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_mempool * BLI_mempool_create(unsigned int esize, unsigned int totelem, unsigned int pchunk, unsigned int flag) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_mempool_destroy(BLI_mempool *pool) ATTR_NONNULL(1)
int BLI_mempool_len(BLI_mempool *pool) ATTR_NONNULL(1)
void ** BLI_smallhash_iternew_p(const SmallHash *sh, SmallHashIter *iter, uintptr_t *key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void * BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
bool BLI_smallhash_haskey(const SmallHash *sh, uintptr_t key) ATTR_NONNULL(1)
void BLI_smallhash_init(SmallHash *sh) ATTR_NONNULL(1)
void ** BLI_smallhash_iternext_p(SmallHashIter *iter, uintptr_t *key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
void BLI_smallhash_insert(SmallHash *sh, uintptr_t key, void *item) ATTR_NONNULL(1)
void BLI_smallhash_release(SmallHash *sh) ATTR_NONNULL(1)
void * BLI_smallhash_lookup(const SmallHash *sh, uintptr_t key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
bool BLI_smallhash_reinsert(SmallHash *sh, uintptr_t key, void *item) ATTR_NONNULL(1)
void * BLI_smallhash_iternew(const SmallHash *sh, SmallHashIter *iter, uintptr_t *key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define INIT_MINMAX(min, max)
#define POINTER_FROM_INT(i)
#define UNUSED_VARS_NDEBUG(...)
#define POINTER_AS_INT(i)
struct ID * DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id)
Object is a sort of wrapper for general info.
#define RV3D_CLIPPING_ENABLED(v3d, rv3d)
@ OP_IS_MODAL_CURSOR_REGION
void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc)
struct BMFace * EDBM_face_find_nearest(struct ViewContext *vc, float *dist_px_manhattan_p)
void EDBM_update_generic(struct Mesh *me, const bool do_tessellation, const bool is_destructive)
void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag)
void EDBM_selectmode_flush(struct BMEditMesh *em)
void EDBM_mesh_normals_update(struct BMEditMesh *em)
bool ED_operator_editmesh_view3d(struct bContext *C)
void ED_region_tag_redraw(struct ARegion *region)
void ED_workspace_status_text(struct bContext *C, const char *str)
#define REGION_DRAW_POST_VIEW
void * ED_region_draw_cb_activate(struct ARegionType *art, void(*draw)(const struct bContext *, struct ARegion *, void *), void *customdata, int type)
void ED_region_draw_cb_exit(struct ARegionType *, void *)
bool ED_view3d_win_to_segment_clipped(struct Depsgraph *depsgraph, const struct ARegion *region, struct View3D *v3d, const float mval[2], float r_ray_start[3], float r_ray_end[3], const bool do_clip)
void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d)
void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, struct Object *ob, float r_pmat[4][4])
void ED_view3d_project_float_v2_m4(const struct ARegion *region, const float co[3], float r_co[2], float mat[4][4])
bool ED_view3d_clip_range_get(struct Depsgraph *depsgraph, const struct View3D *v3d, const struct RegionView3D *rv3d, float *r_clipsta, float *r_clipend, const bool use_ortho_factor)
void ED_view3d_win_to_3d(const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3])
bool ED_view3d_clipping_test(const struct RegionView3D *rv3d, const float co[3], const bool is_local)
bool ED_view3d_unproject(const struct ARegion *region, float regionx, float regiony, float regionz, float world[3])
NSNotificationCenter * center
void GPU_batch_draw_range(GPUBatch *batch, int v_first, int v_count)
void GPU_batch_discard(GPUBatch *)
void GPU_batch_program_set_builtin(GPUBatch *batch, eGPUBuiltinShader shader_id)
GPUBatch * GPU_batch_create_ex(GPUPrimType prim, GPUVertBuf *vert, GPUIndexBuf *elem, eGPUBatchFlag owns_flag)
void GPU_batch_draw(GPUBatch *batch)
#define GPU_batch_uniform_4fv(batch, name, val)
_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 GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_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
void GPU_matrix_pop(void)
void GPU_matrix_pop_projection(void)
#define GPU_matrix_mul(x)
void GPU_matrix_push(void)
void GPU_polygon_offset(float viewdist, float dist)
void GPU_matrix_push_projection(void)
@ GPU_SHADER_3D_UNIFORM_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_line_width(float width)
void GPU_point_size(float size)
void GPU_depth_test(eGPUDepthTest test)
#define GPU_vertbuf_create_with_format(format)
struct GPUVertBuf GPUVertBuf
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len)
void GPU_vertbuf_attr_set(GPUVertBuf *, uint a_idx, uint v_idx, const void *data)
Read Guarded memory(de)allocation.
#define MEM_SIZE_OPTIMAL(size)
void UI_GetThemeColorType3ubv(int colorid, int spacetype, unsigned char col[3])
#define BM_FACE_FIRST_LOOP(p)
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.
void BM_edge_kill(BMesh *bm, BMEdge *e)
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)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_elem_hflag_enable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
void BM_edge_select_set(BMesh *bm, BMEdge *e, const bool select)
Select Edge.
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
BMVert * BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float fac)
Edge Split.
void BM_face_calc_point_in_face(const BMFace *f, float r_co[3])
bool BM_face_point_inside_test(const BMFace *f, const float co[3])
bool BM_face_split_edgenet_connect_islands(BMesh *bm, BMFace *f, BMEdge **edge_net_init, const uint edge_net_init_len, bool use_partial_connect, MemArena *mem_arena, BMEdge ***r_edge_net_new, uint *r_edge_net_new_len)
bool BM_face_split_edgenet(BMesh *bm, BMFace *f, BMEdge **edge_net, const int edge_net_len, BMFace ***r_face_arr, int *r_face_arr_len)
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
float BM_loop_point_side_of_loop_test(const BMLoop *l, const float co[3])
bool BM_edge_in_face(const BMEdge *e, const BMFace *f)
BMLoop * BM_face_edge_share_loop(BMFace *f, BMEdge *e)
Return the Loop Shared by Face and Edge.
bool BM_vert_in_face(BMVert *v, BMFace *f)
BMLoop * BM_face_vert_share_loop(BMFace *f, BMVert *v)
Return the Loop Shared by Face and Vertex.
float BM_loop_point_side_of_edge_test(const BMLoop *l, const float co[3])
BLI_INLINE bool BM_edge_is_boundary(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_loop_is_adjacent(const BMLoop *l_a, const BMLoop *l_b) 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
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
bool closest(btVector3 &v)
static void knife_edge_append_face(KnifeTool_OpData *kcd, KnifeEdge *kfe, BMFace *f)
static void knife_find_line_hits(KnifeTool_OpData *kcd)
static void knife_input_ray_segment(KnifeTool_OpData *kcd, const float mval[2], const float ofs, float r_origin[3], float r_origin_ofs[3])
static void knife_make_cuts(KnifeTool_OpData *kcd)
#define KNIFE_FLT_EPS_PX_VERT
static void calc_ortho_extent(KnifeTool_OpData *kcd)
void EDBM_mesh_knife(bContext *C, LinkNode *polys, bool use_tag, bool cut_through)
struct KnifePosData KnifePosData
static ListBase * knife_empty_list(KnifeTool_OpData *kcd)
static void knife_project_v2(const KnifeTool_OpData *kcd, const float co[3], float sco[2])
static void knifetool_init_bmbvh(KnifeTool_OpData *kcd)
static void knife_make_face_cuts(KnifeTool_OpData *kcd, BMFace *f, ListBase *kfedges)
static void linehit_to_knifepos(KnifePosData *kpos, KnifeLineHit *lh)
static bool knife_verts_edge_in_face(KnifeVert *v1, KnifeVert *v2, BMFace *f)
static void knifetool_update_mval_i(KnifeTool_OpData *kcd, const int mval_i[2])
static void knifetool_exit_ex(bContext *C, KnifeTool_OpData *kcd)
static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void *arg)
#define KNIFE_FLT_EPS_PX_EDGE
wmKeyMap * knifetool_modal_keymap(wmKeyConfig *keyconf)
static BMFace * knife_find_closest_face(KnifeTool_OpData *kcd, float co[3], float cageco[3], bool *is_space)
static void knifetool_finish_ex(KnifeTool_OpData *kcd)
static int linehit_compare(const void *vlh1, const void *vlh2)
static void knife_append_list(KnifeTool_OpData *kcd, ListBase *lst, void *elem)
static KnifeVert * knife_split_edge(KnifeTool_OpData *kcd, KnifeEdge *kfe, const float co[3], const float cageco[3], KnifeEdge **r_kfe)
static void prepare_linehits_for_cut(KnifeTool_OpData *kcd)
#define F_ISECT_SET_UNKNOWN(f)
@ KNF_MODAL_ANGLE_SNAP_TOGGLE
@ KNF_MODAL_IGNORE_SNAP_OFF
@ KNF_MODAL_ADD_CUT_CLOSED
@ KNF_MODAL_IGNORE_SNAP_ON
@ KNF_MODAL_CUT_THROUGH_TOGGLE
static bool knife_ray_intersect_face(KnifeTool_OpData *kcd, const float s[2], const float v1[3], const float v2[3], BMFace *f, const float face_tol_sq, float hit_co[3], float hit_cageco[3])
static int knifetool_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void knifetool_update_mval(KnifeTool_OpData *kcd, const float mval[2])
static void set_lowest_face_tri(KnifeTool_OpData *kcd, BMFace *f, int index)
static KnifeEdge * knife_find_closest_edge_of_face(KnifeTool_OpData *kcd, BMFace *f, float p[3], float cagep[3])
static void knife_finish_cut(KnifeTool_OpData *kcd)
static BMElem * bm_elem_from_knife_vert(KnifeVert *kfv, KnifeEdge **r_kfe)
static void knifetool_cancel(bContext *C, wmOperator *op)
#define F_ISECT_SET_OUTSIDE(f)
static void knife_add_to_vert_edges(KnifeTool_OpData *kcd, KnifeEdge *kfe)
void MESH_OT_knife_tool(wmOperatorType *ot)
static void clip_to_ortho_planes(float v1[3], float v2[3], const float center[3], const float d)
struct KnifeColors KnifeColors
static ListBase * knife_get_face_kedges(KnifeTool_OpData *kcd, BMFace *f)
static void knifetool_free_bmbvh(KnifeTool_OpData *kcd)
struct KnifeVert KnifeVert
static KnifeEdge * new_knife_edge(KnifeTool_OpData *kcd)
static void knife_recalc_projmat(KnifeTool_OpData *kcd)
static KnifeVert * knife_find_closest_vert_of_edge(KnifeTool_OpData *kcd, KnifeEdge *kfe, float p[3], float cagep[3])
static void add_hit_to_facehits(KnifeTool_OpData *kcd, GHash *facehits, BMFace *f, KnifeLineHit *hit)
static int get_lowest_face_tri(KnifeTool_OpData *kcd, BMFace *f)
static void knife_pos_data_clear(KnifePosData *kpd)
static Ref * find_ref(ListBase *lb, void *ref)
static KnifeEdge * get_bm_knife_edge(KnifeTool_OpData *kcd, BMEdge *e)
static KnifeVert * new_knife_vert(KnifeTool_OpData *kcd, const float co[3], const float cageco[3])
static bool knife_add_single_cut__is_linehit_outside_face(BMFace *f, const KnifeLineHit *lh, const float co[3])
static void knifetool_draw_angle_snapping(const KnifeTool_OpData *kcd)
static float snap_v2_angle(float r[2], const float v[2], const float v_ref[2], float angle_snap)
static void knife_cut_face(KnifeTool_OpData *kcd, BMFace *f, ListBase *hits)
static bool bm_ray_cast_cb_elem_not_in_face_check(BMFace *f, void *user_data)
static int knife_sample_screen_density_from_closest_face(KnifeTool_OpData *kcd, const float radius, BMFace *f, const float cageco[3])
static bool knife_snap_angle(KnifeTool_OpData *kcd)
static void knife_start_cut(KnifeTool_OpData *kcd)
static void knifetool_init(bContext *C, KnifeTool_OpData *kcd, const bool only_select, const bool cut_through, const bool is_interactive)
static void knife_add_single_cut(KnifeTool_OpData *kcd, KnifeLineHit *lh1, KnifeLineHit *lh2, BMFace *f)
static int knife_update_active(KnifeTool_OpData *kcd)
static KnifeVert * get_bm_knife_vert(KnifeTool_OpData *kcd, BMVert *v)
#define KNIFE_FLT_EPS_PX_FACE
static float knife_snap_size(KnifeTool_OpData *kcd, float maxsize)
static BMElem * bm_elem_from_knife_edge(KnifeEdge *kfe)
static bool point_is_visible(KnifeTool_OpData *kcd, const float p[3], const float s[2], BMElem *ele_test)
static void knife_add_cut(KnifeTool_OpData *kcd)
static bool knife_snap_update_from_mval(KnifeTool_OpData *kcd, const float mval[2])
static void knifetool_finish(wmOperator *op)
static void knife_update_header(bContext *C, wmOperator *op, KnifeTool_OpData *kcd)
static void knife_append_list_no_dup(KnifeTool_OpData *kcd, ListBase *lst, void *elem)
static bool knife_snap_edge_in_angle(KnifeTool_OpData *kcd, const float sco[3], const float kfv1_sco[2], const float kfv2_sco[2], float *r_dist_sq, float *r_lambda)
static BMFace * knife_find_common_face(ListBase *faces1, ListBase *faces2)
struct KnifeEdge KnifeEdge
#define KNIFE_FLT_EPS_SQUARED
static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event)
struct KnifeTool_OpData KnifeTool_OpData
static void knife_interp_v3_v3v3(const KnifeTool_OpData *kcd, float r_co[3], const float v1[3], const float v2[3], float lambda_ss)
static int sort_verts_by_dist_cb(void *co_p, const void *cur_a_p, const void *cur_b_p)
static void knife_add_edge_faces_to_vert(KnifeTool_OpData *kcd, KnifeVert *kfv, BMEdge *e)
static void knifetool_exit(bContext *C, wmOperator *op)
static bool coinciding_edges(BMEdge *e1, BMEdge *e2)
static bool edbm_mesh_knife_point_isect(LinkNode *polys, const float cent_ss[2])
static void knife_init_colors(KnifeColors *colors)
static void set_linehit_depth(KnifeTool_OpData *kcd, KnifeLineHit *lh)
struct KnifeLineHit KnifeLineHit
#define F_ISECT_IS_UNKNOWN(f)
void(* MEM_freeN)(void *vmemh)
size_t(* MEM_allocN_len)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
_W64 unsigned int uintptr_t
struct ARegionType * type
struct BMLoop *(* looptris)[3]
struct BMLoop * radial_next
struct Depsgraph * depsgraph
struct RegionView3D * rv3d
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
struct ReportList * reports
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
wmKeyMap * WM_modalkeymap_find(wmKeyConfig *keyconf, const char *idname)
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
const char * WM_bool_as_string(bool test)
wmKeyMap * WM_modalkeymap_ensure(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)