53 #include "RNA_prototypes.h"
76 #define USE_FACE_CREATE_SEL_EXTEND
101 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
102 Object *obedit = objects[ob_index];
126 .calc_looptri = true,
127 .calc_normals = false,
128 .is_destructive = true,
163 prop =
RNA_def_int(
ot->
srna,
"number_cuts", 1, 1, 100,
"Number of Cuts",
"", 1, 10);
169 ot->
srna,
"smoothness", 0.0f, 0.0f, 1e3f,
"Smoothness",
"Smoothness factor", 0.0f, 1.0f);
177 "When disabled, newly created faces are limited to 3 and 4 sided faces");
184 "How to subdivide quad corners (anything other than Straight Cut will prevent n-gons)");
192 "Fractal randomness factor",
196 "fractal_along_normal",
201 "Apply fractal displacement along normal only",
210 "Seed for the random number generator",
235 const int cuts_default)
248 ot->
srna,
"number_cuts", cuts_default, 0, 1000,
"Number of Cuts",
"", cuts_min, 64);
253 prop_subd_edgering_types,
256 "Interpolation method");
259 ot->
srna,
"smoothness", 1.0f, 0.0f, 1e3f,
"Smoothness",
"Smoothness factor", 0.0f, 2.0f);
263 "profile_shape_factor",
268 "How much intermediary new edges are shrunk/expanded",
294 uint objects_len = 0;
301 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
302 Object *obedit = objects[ob_index];
311 "subdivide_edgering edges=%he interp_mode=%i cuts=%i smooth=%f "
312 "profile_shape=%i profile_shape_factor=%f",
324 .calc_looptri = true,
325 .calc_normals = false,
326 .is_destructive = true,
337 ot->
name =
"Subdivide Edge-Ring";
338 ot->
description =
"Subdivide perpendicular edges to the selected edge-ring";
339 ot->
idname =
"MESH_OT_subdivide_edgering";
362 uint objects_len = 0;
365 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
366 Object *obedit = objects[ob_index];
389 .calc_looptri = true,
390 .calc_normals = false,
391 .is_destructive = true,
402 ot->
name =
"Un-Subdivide";
415 ot->
srna,
"iterations", 2, 1, 1000,
"Iterations",
"Number of times to un-subdivide", 1, 100);
434 const int totelem_old[3],
435 const int totelem_new[3])
439 "Removed: %d vertices, %d edges, %d faces",
440 totelem_old[0] - totelem_new[0],
441 totelem_old[1] - totelem_new[1],
442 totelem_old[2] - totelem_new[2]);
449 uint objects_len = 0;
452 bool changed_multi =
false;
454 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
455 Object *obedit = objects[ob_index];
511 changed_multi =
true;
519 .calc_looptri = true,
520 .calc_normals = false,
521 .is_destructive = true,
546 ot->
description =
"Delete selected vertices, edges or faces";
561 prop_mesh_delete_types,
564 "Method used for deleting mesh data");
583 }
while ((l_iter = l_iter->
next) != l_first);
591 int totelem_old_sel[3];
594 uint objects_len = 0;
604 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
605 Object *obedit = objects[ob_index];
653 .calc_looptri = true,
654 .calc_normals = false,
655 .is_destructive = true,
672 ot->
name =
"Delete Loose";
674 ot->
idname =
"MESH_OT_delete_loose";
699 uint objects_len = 0;
702 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
703 Object *obedit = objects[ob_index];
716 .calc_looptri = true,
717 .calc_normals = false,
718 .is_destructive = true,
729 ot->
name =
"Collapse Edges & Faces";
731 "Collapse isolated edge and face regions, merging data such as UV's and color attributes. "
732 "This can collapse edge-rings as well as regions of connected faces into vertices";
733 ot->
idname =
"MESH_OT_edge_collapse";
754 uint vote_on_smooth[2] = {0, 0};
762 return (vote_on_smooth[0] < vote_on_smooth[1]);
765 #ifdef USE_FACE_CREATE_SEL_EXTEND
778 if ((e_used ==
NULL) || (e_used != e_iter)) {
781 if (i >= e_arr_len) {
930 bool changed_multi =
false;
932 uint objects_len = 0;
935 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
936 Object *obedit = objects[ob_index];
948 #ifdef USE_FACE_CREATE_SEL_EXTEND
959 "contextual_create geom=%hfev mat_nr=%i use_smooth=%b",
973 #ifdef USE_FACE_CREATE_SEL_EXTEND
1006 .calc_looptri = true,
1007 .calc_normals = false,
1008 .is_destructive = true,
1010 changed_multi =
true;
1014 if (!changed_multi) {
1024 ot->
name =
"Make Edge/Face";
1026 ot->
idname =
"MESH_OT_edge_face_add";
1050 uint objects_len = 0;
1053 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1054 Object *obedit = objects[ob_index];
1083 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1084 Object *obedit = objects[ob_index];
1087 .calc_looptri = true,
1088 .calc_normals = false,
1089 .is_destructive = false,
1134 uint objects_len = 0;
1137 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1138 Object *obedit = objects[ob_index];
1162 .calc_looptri = true,
1163 .calc_normals = false,
1164 .is_destructive = false,
1195 "Consider vertices instead of edges to select which edges to (un)tag as sharp");
1210 bool is_pair = (verts_len == 2);
1212 bool check_degenerate =
true;
1214 bool checks_succeded =
true;
1217 if (verts_len < 2) {
1237 check_degenerate =
false;
1246 "connect_vert_pair verts=%eb verts_exclude=%hv faces_exclude=%hf",
1251 checks_succeded =
false;
1258 "connect_verts verts=%eb faces_exclude=%hf check_degenerate=%b",
1262 check_degenerate)) {
1263 checks_succeded =
false;
1266 if (checks_succeded) {
1275 if (
len && is_pair) {
1281 bool em_backup_free =
true;
1288 em_backup_free =
false;
1298 .calc_looptri =
true,
1299 .calc_normals =
false,
1300 .is_destructive =
true,
1304 if (em_backup_free) {
1316 uint objects_len = 0;
1317 uint failed_objects_len = 0;
1321 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1322 Object *obedit = objects[ob_index];
1326 failed_objects_len++;
1336 ot->
name =
"Vertex Connect";
1337 ot->
idname =
"MESH_OT_vert_connect";
1338 ot->
description =
"Connect selected vertices of faces, splitting the face";
1405 bool changed =
false;
1406 bool has_wire =
false;
1422 if (has_wire ==
false) {
1427 ese = ese_last->
next;
1437 }
while ((
void)(ese_last = ese), (ese = ese->
next));
1444 if (changed ==
false) {
1462 ese = ese_prev->
next;
1474 }
while ((
void)(ese_prev = ese), (ese = ese->
next));
1476 if (changed ==
false) {
1522 for (ese = selected_orig.
first; ese; ese = ese->
next) {
1532 if ((e_curr->
v1 != l_curr->
v) == (e_prev->v1 != l_prev->
v)) {
1541 v = (&e_curr->
v1)[side];
1546 v = (&e_curr->
v1)[!side];
1563 uint objects_len = 0;
1564 uint failed_selection_order_len = 0;
1565 uint failed_connect_len = 0;
1569 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1570 Object *obedit = objects[ob_index];
1583 failed_connect_len++;
1606 .calc_looptri = true,
1607 .calc_normals = false,
1608 .is_destructive = true,
1612 failed_selection_order_len++;
1623 if (failed_selection_order_len == objects_len) {
1627 if (failed_connect_len == objects_len) {
1638 ot->
name =
"Vertex Connect Path";
1639 ot->
idname =
"MESH_OT_vert_connect_path";
1640 ot->
description =
"Connect vertices by their selection order, creating edges, splitting faces";
1659 uint objects_len = 0;
1662 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1663 Object *obedit = objects[ob_index];
1671 em, op,
"faces.out",
true,
"connect_verts_concave faces=%hf",
BM_ELEM_SELECT)) {
1676 .calc_looptri = true,
1677 .calc_normals = false,
1678 .is_destructive = true,
1689 ot->
name =
"Split Concave Faces";
1690 ot->
idname =
"MESH_OT_vert_connect_concave";
1711 uint objects_len = 0;
1715 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1716 Object *obedit = objects[ob_index];
1727 "connect_verts_nonplanar faces=%hf angle_limit=%f",
1735 .calc_looptri = true,
1736 .calc_normals = false,
1737 .is_destructive = true,
1750 ot->
name =
"Split Non-Planar Faces";
1751 ot->
idname =
"MESH_OT_vert_connect_nonplanar";
1752 ot->
description =
"Split non-planar faces that exceed the angle threshold";
1784 uint objects_len = 0;
1791 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1792 Object *obedit = objects[ob_index];
1800 "planar_faces faces=%hf iterations=%i factor=%f",
1809 .calc_looptri = true,
1810 .calc_normals = true,
1811 .is_destructive = true,
1822 ot->
name =
"Make Planar Faces";
1823 ot->
idname =
"MESH_OT_face_make_planar";
1854 em, op,
"edges.out",
false,
"split_edges edges=%he",
BM_ELEM_SELECT)) {
1863 .calc_looptri = true,
1864 .calc_normals = false,
1865 .is_destructive = true,
1888 if (eed->
l !=
NULL) {
1904 "split_edges edges=%he verts=%hv use_verts=%b",
1912 if (eed->
l !=
NULL) {
1922 for (
int i = 0; i < 2; i++) {
1938 .calc_looptri = true,
1939 .calc_normals = false,
1940 .is_destructive = true,
1951 uint objects_len = 0;
1954 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
1955 Object *obedit = objects[ob_index];
1983 ot->
description =
"Split selected edges so that each neighbor face gets its own copy";
1994 {
BM_EDGE,
"EDGE", 0,
"Faces by Edges",
"Split faces along selected edges"},
1998 "Faces & Edges by Vertices",
1999 "Split faces and edges connected to selected vertices"},
2016 uint objects_len = 0;
2019 bool changed =
false;
2021 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2022 Object *obedit = objects[ob_index];
2035 "duplicate geom=%hvef use_select_history=%b use_edge_flip_from_face=%b",
2058 .calc_looptri = true,
2059 .calc_normals = false,
2060 .is_destructive = true,
2081 ot->
description =
"Duplicate selected vertices, edges or faces";
2105 return lnors_ed_arr;
2110 if (!lnors_ed_arr) {
2114 if (lnors_ed_arr->
totloop == 0) {
2131 for (
int i = 0; i < lnors_ed_arr_new_full->
totloop; i++, lnor_ed_new_full++) {
2176 }
while (
l != l_start);
2201 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
2210 .calc_looptri = true,
2211 .calc_normals = false,
2212 .is_destructive = false,
2219 bool has_flipped_faces =
false;
2225 has_flipped_faces =
true;
2231 .calc_looptri = true,
2232 .calc_normals = false,
2233 .is_destructive = false,
2237 if (lnors_ed_arr !=
NULL) {
2247 uint objects_len = 0;
2251 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2252 Object *obedit = objects[ob_index];
2276 ot->
name =
"Flip Normals";
2277 ot->
description =
"Flip the direction of selected faces' normals (and of their vertices)";
2278 ot->
idname =
"MESH_OT_flip_normals";
2290 "Custom Normals Only",
2291 "Only flip the custom loop normals of the selected elements");
2309 int tot_failed_all = 0;
2310 bool no_selected_edges =
true, invalid_selected_edges =
true;
2313 uint objects_len = 0;
2316 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2317 Object *obedit = objects[ob_index];
2324 no_selected_edges =
false;
2347 invalid_selected_edges =
false;
2365 const int tot_failed = tot - tot_rotate;
2367 tot_failed_all += tot_failed;
2369 if (tot_failed != 0) {
2384 .calc_looptri = true,
2385 .calc_normals = false,
2386 .is_destructive = true,
2391 if (no_selected_edges) {
2393 op->
reports,
RPT_ERROR,
"Select edges or face pairs for edge loops to rotate about");
2399 if (invalid_selected_edges) {
2404 if (tot_failed_all != 0) {
2414 ot->
name =
"Rotate Selected Edge";
2415 ot->
description =
"Rotate selected edge or adjoining faces";
2416 ot->
idname =
"MESH_OT_edge_rotate";
2439 bool changed =
false;
2441 uint objects_len = 0;
2444 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2445 Object *obedit = objects[ob_index];
2475 .calc_looptri = true,
2476 .calc_normals = false,
2477 .is_destructive = false,
2494 ot->
name =
"Hide Selected";
2496 ot->
description =
"Hide (un)selected vertices, edges or faces";
2507 ot->
srna,
"unselected",
false,
"Unselected",
"Hide unselected rather than selected");
2521 uint objects_len = 0;
2524 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2525 Object *obedit = objects[ob_index];
2531 .calc_looptri = true,
2532 .calc_normals = false,
2533 .is_destructive = false,
2545 ot->
name =
"Reveal Hidden";
2547 ot->
description =
"Reveal all hidden vertices, edges and faces";
2570 uint objects_len = 0;
2573 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2574 Object *obedit = objects[ob_index];
2595 if (lnors_ed_arr !=
NULL) {
2602 .calc_looptri = true,
2603 .calc_normals = false,
2604 .is_destructive = false,
2615 ot->
name =
"Recalculate Normals";
2616 ot->
description =
"Make face and vertex normals point either outside or inside the mesh";
2617 ot->
idname =
"MESH_OT_normals_make_consistent";
2649 uint objects_len = 0;
2652 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2653 Object *obedit = objects[ob_index];
2656 bool mirrx =
false, mirry =
false, mirrz =
false;
2657 float clip_dist = 0.0f;
2692 for (
int i = 0; i < repeat; i++) {
2696 "smooth_vert verts=%hv factor=%f mirror_clip_x=%b mirror_clip_y=%b mirror_clip_z=%b "
2697 "clip_dist=%f use_axis_x=%b use_axis_y=%b use_axis_z=%b",
2719 .calc_looptri = true,
2720 .calc_normals = false,
2721 .is_destructive = false,
2732 ot->
name =
"Smooth Vertices";
2734 ot->
idname =
"MESH_OT_vertices_smooth";
2744 ot->
srna,
"factor", 0.0f, -10.0f, 10.0f,
"Smoothing",
"Smoothing factor", 0.0f, 1.0f);
2746 ot->
srna,
"repeat", 1, 1, 1000,
"Repeat",
"Number of times to smooth the mesh", 1, 100);
2766 int tot_unselected = 0;
2781 uint objects_len = 0;
2784 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2785 Object *obedit = objects[ob_index];
2800 bool failed_repeat_loop =
false;
2801 for (
int i = 0; i < repeat; i++) {
2804 "smooth_laplacian_vert verts=%hv lambda_factor=%f lambda_border=%f "
2805 "use_x=%b use_y=%b use_z=%b preserve_volume=%b",
2813 failed_repeat_loop =
true;
2817 if (failed_repeat_loop) {
2829 .calc_looptri = true,
2830 .calc_normals = false,
2831 .is_destructive = false,
2836 if (tot_unselected == objects_len) {
2847 ot->
name =
"Laplacian Smooth Vertices";
2849 ot->
idname =
"MESH_OT_vertices_smooth_laplacian";
2859 ot->
srna,
"repeat", 1, 1, 1000,
"Number of iterations to smooth the mesh",
"", 1, 200);
2861 ot->
srna,
"lambda_factor", 1.0f, 1e-7f, 1000.0f,
"Lambda factor",
"", 1e-7f, 1000.0f);
2867 "Lambda factor in border",
2881 "Apply volume preservation after smooth");
2909 uint objects_len = 0;
2912 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2913 Object *obedit = objects[ob_index];
2923 .calc_looptri = false,
2924 .calc_normals = false,
2925 .is_destructive = false,
2936 ot->
name =
"Shade Smooth";
2937 ot->
description =
"Display faces smooth (using vertex normals)";
2938 ot->
idname =
"MESH_OT_faces_shade_smooth";
2957 uint objects_len = 0;
2960 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
2961 Object *obedit = objects[ob_index];
2971 .calc_looptri = false,
2972 .calc_normals = false,
2973 .is_destructive = false,
2986 ot->
idname =
"MESH_OT_faces_shade_flat";
3008 uint objects_len = 0;
3011 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3012 Object *obedit = objects[ob_index];
3031 .calc_looptri = false,
3032 .calc_normals = false,
3033 .is_destructive = false,
3044 uint objects_len = 0;
3047 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3048 Object *obedit = objects[ob_index];
3066 .calc_looptri = false,
3067 .calc_normals = false,
3068 .is_destructive = false,
3082 uint objects_len = 0;
3086 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3087 Object *ob = objects[ob_index];
3107 "rotate_colors faces=%hf use_ccw=%b color_index=%i",
3121 .calc_looptri = false,
3122 .calc_normals = false,
3123 .is_destructive = false,
3135 uint objects_len = 0;
3139 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3140 Object *obedit = objects[ob_index];
3159 em, &bmop, op,
"reverse_colors faces=%hf color_index=%i",
BM_ELEM_SELECT, color_index);
3169 .calc_looptri = false,
3170 .calc_normals = false,
3171 .is_destructive = false,
3200 ot->
name =
"Reverse UVs";
3201 ot->
idname =
"MESH_OT_uvs_reverse";
3202 ot->
description =
"Flip direction of UV coordinates inside faces";
3218 ot->
name =
"Rotate Colors";
3219 ot->
idname =
"MESH_OT_colors_rotate";
3236 ot->
name =
"Reverse Colors";
3237 ot->
idname =
"MESH_OT_colors_reverse";
3238 ot->
description =
"Flip direction of vertex colors inside faces";
3249 RNA_def_enum(
ot->
srna,
"axis", axis_items, DIRECTION_CW,
"Axis",
"Axis to mirror colors around");
3268 const bool use_first,
3269 const bool use_uvmerge,
3281 if (use_first ==
false) {
3304 em, wmop,
"pointmerge_facedata verts=%hv vert_snap=%e",
BM_ELEM_SELECT, mergevert)) {
3310 em, wmop,
"pointmerge verts=%hv merge_co=%v",
BM_ELEM_SELECT, mergevert->
co)) {
3320 const bool use_cursor,
3321 const bool use_uvmerge,
3326 float co[3], cent[3] = {0.0f, 0.0f, 0.0f};
3327 const float *vco =
NULL;
3350 fac = 1.0f / (
float)i;
3377 uint objects_len = 0;
3383 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3384 Object *obedit = objects[ob_index];
3423 .calc_looptri = true,
3424 .calc_normals = false,
3425 .is_destructive = true,
3539 const bool use_sharp_edge_from_normals =
RNA_boolean_get(op->
ptr,
"use_sharp_edge_from_normals");
3541 int count_multi = 0;
3544 uint objects_len = 0;
3548 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3549 Object *obedit = objects[ob_index];
3558 const int totvert_orig = em->
bm->
totvert;
3577 if (use_unselected) {
3585 if (!
EDBM_op_callf(em, op,
"weld_verts targetmap=%S", &bmop,
"targetmap.out")) {
3604 count_multi +=
count;
3607 .calc_looptri = true,
3608 .calc_normals = false,
3609 .is_destructive = true,
3623 ot->
name =
"Merge by Distance";
3624 ot->
description =
"Merge vertices based on their proximity";
3625 ot->
idname =
"MESH_OT_remove_doubles";
3640 "Maximum distance between elements to merge",
3647 "Merge selected to other unselected vertices");
3650 "use_sharp_edge_from_normals",
3653 "Calculate sharp edges using custom normal data (when available)");
3679 for (
int i = 0; i < totshape; i++) {
3690 int tot_shapekeys = 0;
3691 int tot_selected_verts_objects = 0;
3693 uint objects_len = 0;
3696 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3697 Object *obedit = objects[ob_index];
3704 tot_selected_verts_objects++;
3712 .calc_looptri =
false,
3713 .calc_normals =
false,
3714 .is_destructive =
false,
3719 if (tot_selected_verts_objects == 0) {
3723 if (tot_shapekeys == 0) {
3734 ot->
name =
"Shape Propagate";
3735 ot->
description =
"Apply selected vertex locations to all other shape keys";
3736 ot->
idname =
"MESH_OT_shape_propagate_to_all";
3757 Key *key_ref = me_ref->
key;
3764 int totshape_ref = 0;
3773 if (totshape_ref == 0 || shape_ref < 0) {
3777 if (shape_ref >= totshape_ref) {
3787 int tot_selected_verts_objects = 0;
3788 uint objects_len = 0;
3791 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3792 Object *obedit = objects[ob_index];
3802 tot_selected_verts_objects++;
3836 .calc_looptri =
true,
3837 .calc_normals =
true,
3838 .is_destructive =
false,
3844 if (tot_selected_verts_objects == 0) {
3872 tmp.
value = totitem;
3908 ot->
name =
"Blend from Shape";
3910 ot->
idname =
"MESH_OT_blend_from_shape";
3927 RNA_def_float(
ot->
srna,
"blend", 1.0f, -1e3f, 1e3f,
"Blend",
"Blending factor", -2.0f, 2.0f);
3942 uint objects_len = 0;
3945 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
3946 Object *obedit = objects[ob_index];
3957 em, &bmop, op,
"solidify geom=%hf thickness=%f",
BM_ELEM_SELECT, thickness)) {
3978 .calc_looptri = true,
3979 .calc_normals = false,
3980 .is_destructive = true,
3993 ot->
description =
"Create a solid skin by extruding, compensating for sharp angles";
4004 ot->
srna,
"thickness", 0.01f, -1e4f, 1e4f,
"Thickness",
"", -10.0f, 10.0f);
4014 #define KNIFE_EXACT 1
4015 #define KNIFE_MIDPOINT 2
4016 #define KNIFE_MULTICUT 3
4028 const float sco_b[2],
4029 float (*mouse_path)[2],
4034 #define MAXSLOPE 100000
4035 float x11, y11, x12 = 0, y12 = 0, x2max, x2min, y2max;
4036 float y2min, dist, lastdist = 0, xdiff2, xdiff1;
4037 float m1, b1, m2, b2, x21, x22, y21, y22, xi;
4038 float yi, x1min, x1max, y1max, y1min, perc = 0;
4052 xdiff2 = (x22 - x21);
4054 m2 = (y22 - y21) / xdiff2;
4055 b2 = ((x22 * y21) - (x21 * y22)) / xdiff2;
4066 for (i = 0; i <
len; i++) {
4072 x11 = mouse_path[i][0];
4073 y11 = mouse_path[i][1];
4075 x12 = mouse_path[i][0];
4076 y12 = mouse_path[i][1];
4079 if ((x11 == x21 && y11 == y21) || (x12 == x21 && y12 == y21)) {
4085 if ((x11 == x22 && y11 == y22) || (x12 == x22 && y12 == y22)) {
4094 for (i = 0; i <
len; i++) {
4100 x11 = mouse_path[i][0];
4101 y11 = mouse_path[i][1];
4103 x12 = mouse_path[i][0];
4104 y12 = mouse_path[i][1];
4109 dist = (y12 - m2 * x12 - b2);
4120 if ((lastdist * dist) <= 0) {
4121 xdiff1 = (x12 - x11);
4123 m1 = (y12 - y11) / xdiff1;
4124 b1 = ((x12 * y11) - (x11 * y12)) / xdiff1;
4130 x2max =
max_ff(x21, x22) + 0.001f;
4131 x2min =
min_ff(x21, x22) - 0.001f;
4132 y2max =
max_ff(y21, y22) + 0.001f;
4133 y2min =
min_ff(y21, y22) - 0.001f;
4138 x1max =
max_ff(x11, x12);
4139 x1min =
min_ff(x11, x12);
4140 xi = (
min_ff(x2max, x1max) +
max_ff(x2min, x1min)) / 2.0f;
4142 y1max =
max_ff(y11, y12);
4143 y1min =
min_ff(y11, y12);
4144 yi = (
min_ff(y2max, y1max) +
max_ff(y2min, y1min)) / 2.0f;
4155 xi = (b1 - b2) / (m2 - m1);
4156 yi = (b1 * m2 - m1 * b2) / (m2 - m1);
4160 if ((xi >= x2min) && (xi <= x2max) && (yi <= y2max) && (yi >= y2min)) {
4178 if ((m2 <= 1.0f) && (m2 >= -1.0f)) {
4179 perc = (xi - x21) / (x22 - x21);
4182 perc = (yi - y21) / (y22 - y21);
4194 #define ELE_EDGE_CUT 1
4212 float(*screen_vert_coords)[2], (*sco)[2], (*mouse_path)[2];
4267 bool is_cut =
false;
4273 if ((sco_a[0] != FLT_MAX) && (sco_b[0] != FLT_MAX)) {
4276 if (isect != 0.0f) {
4315 .calc_looptri = true,
4316 .calc_normals = false,
4317 .is_destructive = true,
4328 ot->
description =
"Cut selected edges and faces into parts";
4371 .use_toolflags =
true,
4395 "duplicate geom=%hvef dest=%p",
4400 "delete geom=%hvef context=%i",
4433 .totedge = edges_len,
4434 .totloop = faces_len * 3,
4435 .totface = faces_len,
4443 if (use_custom_normals) {
4469 if (use_custom_normals) {
4473 for (
uint i = 0; i < verts_len; i++) {
4511 if ((totcolp && matarar) == 0) {
4521 if (mat_nr < ob->totcol) {
4522 ma_ob = ob->
mat[mat_nr];
4530 if (mat_nr < *totcolp) {
4531 ma_obdata = (*matarar)[mat_nr];
4544 (*matarar)[0] = ma_obdata;
4563 const short mat_nr = f_cmp->
mat_nr;
4569 if (f->
mat_nr == mat_nr) {
4578 }
while ((l_iter = l_iter->
next) != l_first);
4613 const bool clear_object_data =
true;
4621 int(*groups)[3] =
NULL;
4623 bm_old, vert_groups, edge_groups, face_groups, &groups);
4624 if (groups_len <= 1) {
4628 if (clear_object_data) {
4636 for (
int i = 1; i < groups_len; i++) {
4642 vert_groups + group_ofs[0],
4644 edge_groups + group_ofs[1],
4646 face_groups + group_ofs[2],
4650 group_ofs[0] += groups[i][0];
4651 group_ofs[1] += groups[i][1];
4652 group_ofs[2] += groups[i][2];
4658 if (clear_object_data) {
4663 .update_shapekey_indices =
true,
4683 bool changed_multi =
false;
4687 uint empty_selection_len = 0;
4690 for (
uint bs_index = 0; bs_index < bases_len; bs_index++) {
4691 Base *base = bases[bs_index];
4693 bool changed =
false;
4698 if (++empty_selection_len == bases_len) {
4724 .calc_looptri = true,
4725 .calc_normals = false,
4726 .is_destructive = true,
4729 changed_multi |= changed;
4741 Object *ob = base_iter->object;
4746 bool changed =
false;
4750 .use_toolflags =
true,
4772 .calc_object_remap =
true,
4781 changed_multi |= changed;
4788 if (changed_multi) {
4811 ot->
description =
"Separate selected geometry into a new mesh";
4836 bool has_selected_edges =
false, has_faces_filled =
false;
4839 uint objects_len = 0;
4842 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
4843 Object *obedit = objects[ob_index];
4846 const int totface_orig = em->
bm->
totface;
4851 has_selected_edges =
true;
4855 em, &bmop, op,
"triangle_fill edges=%he use_beauty=%b",
BM_ELEM_SELECT, use_beauty)) {
4866 has_faces_filled =
true;
4878 .calc_looptri = true,
4879 .calc_normals = false,
4880 .is_destructive = true,
4885 if (!has_selected_edges) {
4890 if (!has_faces_filled) {
4949 const float eps_even = 1e-3f;
4960 el_store = eloops.
first;
4977 for (
int i = 0; i < edges_len; i++) {
4982 span = verts_len / 4;
4985 span =
min_ii(span, (verts_len / 2) - 1);
4989 if ((
count == 1) && ((verts_len & 1) == 0) && (verts_len == edges_len)) {
5003 float angle_best = -1.0f;
5004 for (v_link =
verts->first; v_link; v_link = v_link->
next) {
5006 if ((
angle > angle_best) || (v_link_best ==
NULL)) {
5008 v_link_best = v_link;
5012 v_act_link = v_link_best;
5013 v_act = v_act_link->
data;
5021 v_act = v_act_link->
data;
5038 for (v_link =
verts->first, i = 0; v_link; v_link = v_link->
next, i++) {
5042 ele_sort[i].
data =
v;
5053 for (i = 0; i < 4; i++) {
5059 for (v_link =
verts->first, i = 0; i < verts_len / 2; v_link = v_link->
next, i++) {
5074 for (i = 0; i < span; i++) {
5094 uint objects_len = 0;
5097 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5099 Object *obedit = objects[ob_index];
5102 bool use_prepare =
true;
5104 const int totedge_orig = em->
bm->
totedge;
5105 const int totface_orig = em->
bm->
totface;
5146 "grid_fill edges=%he mat_nr=%i use_smooth=%b use_interp_simple=%b",
5150 use_interp_simple)) {
5177 .calc_looptri = true,
5178 .calc_normals = false,
5179 .is_destructive = true,
5205 prop =
RNA_def_int(
ot->
srna,
"span", 1, 1, 1000,
"Span",
"Number of grid columns", 1, 100);
5213 "Vertex that is the corner of the grid",
5218 "use_interp_simple",
5221 "Use simple interpolation of grid vertices");
5235 uint objects_len = 0;
5239 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5240 Object *obedit = objects[ob_index];
5248 em, op,
"faces.out",
true,
"holes_fill edges=%he sides=%i",
BM_ELEM_SELECT, sides)) {
5254 .calc_looptri = true,
5255 .calc_normals = false,
5256 .is_destructive = true,
5284 "Number of sides in hole required to fill (zero fills all holes)",
5298 uint objects_len = 0;
5302 const float angle_max =
M_PI;
5306 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5307 Object *obedit = objects[ob_index];
5314 if (angle_limit >= angle_max) {
5334 "beautify_fill faces=%hf edges=%he",
5342 .calc_looptri = true,
5343 .calc_normals = false,
5344 .is_destructive = true,
5358 ot->
name =
"Beautify Faces";
5359 ot->
idname =
"MESH_OT_beautify_fill";
5360 ot->
description =
"Rearrange some faces to try to get less degenerated geometry";
5396 uint objects_len = 0;
5399 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5400 Object *obedit = objects[ob_index];
5411 "poke faces=%hf offset=%f use_relative_offset=%b center_mode=%i",
5414 use_relative_offset,
5431 .calc_looptri = true,
5432 .calc_normals = true,
5433 .is_destructive = true,
5448 "Weighted median face center"},
5467 ot->
srna,
"offset", 0.0f, -1e3f, 1e3f,
"Poke Offset",
"Poke Offset", -1.0f, 1.0f);
5469 "use_relative_offset",
5472 "Scale the offset by surrounding geometry");
5478 "Poke face center calculation");
5493 uint objects_len = 0;
5496 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5497 Object *obedit = objects[ob_index];
5513 "triangulate faces=%hf quad_method=%i ngon_method=%i",
5538 .calc_looptri = true,
5539 .calc_normals = false,
5540 .is_destructive = true,
5552 ot->
name =
"Triangulate Faces";
5553 ot->
idname =
"MESH_OT_quads_convert_to_tris";
5568 "Method for splitting the quads into triangles");
5574 "Method for splitting the n-gons into triangles");
5587 uint objects_len = 0;
5597 float angle_face_threshold, angle_shape_threshold;
5602 is_face_pair = (totelem_sel[2] == 2);
5611 angle_face_threshold =
DEG2RADF(180.0f);
5619 angle_shape_threshold =
DEG2RADF(180.0f);
5626 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5627 Object *obedit = objects[ob_index];
5641 "join_triangles faces=%hf angle_face_threshold=%f angle_shape_threshold=%f "
5642 "cmp_seam=%b cmp_sharp=%b cmp_uvs=%b cmp_vcols=%b cmp_materials=%b",
5644 angle_face_threshold,
5645 angle_shape_threshold,
5658 .calc_looptri = true,
5659 .calc_normals = false,
5660 .is_destructive = true,
5691 "Shape angle limit",
5706 ot->
name =
"Tris to Quads";
5707 ot->
idname =
"MESH_OT_tris_convert_to_quads";
5735 const float vertex_group_factor =
RNA_float_get(op->
ptr,
"vertex_group_factor");
5738 const float symmetry_eps = 0.00002f;
5739 const int symmetry_axis = use_symmetry ?
RNA_enum_get(op->
ptr,
"symmetry_axis") : -1;
5742 if (ratio == 1.0f) {
5747 uint objects_len = 0;
5751 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5752 Object *obedit = objects[ob_index];
5764 if (use_vertex_group && (cd_dvert_offset == -1)) {
5766 use_vertex_group =
false;
5773 float weight = 0.0f;
5775 if (use_vertex_group) {
5778 if (invert_vertex_group) {
5779 weight = 1.0f - weight;
5787 vweights[i] = weight;
5796 ratio_adjust = ratio;
5807 int totface_basis = 0;
5808 int totface_adjacent = 0;
5813 const int f_len = f->
len > 4 ? (f->
len - 2) : 1;
5814 totface_basis += f_len;
5816 BMLoop *l_iter, *l_first;
5820 totface_adjacent += f_len;
5823 }
while ((l_iter = l_iter->
next) != l_first);
5826 ratio_adjust = ratio;
5827 ratio_adjust = 1.0f - ratio_adjust;
5828 ratio_adjust *= (
float)totface_adjacent / (
float)totface_basis;
5829 ratio_adjust = 1.0f - ratio_adjust;
5833 em->
bm, ratio_adjust, vweights, vertex_group_factor,
false, symmetry_axis, symmetry_eps);
5847 .calc_looptri = true,
5848 .calc_normals = true,
5849 .is_destructive = true,
5870 uiItemR(layout, op->
ptr,
"use_vertex_group", 0,
NULL, ICON_NONE);
5877 uiItemR(row, op->
ptr,
"use_symmetry", 0,
"", ICON_NONE);
5886 ot->
name =
"Decimate Geometry";
5906 "Use active vertex group as an influence");
5908 "vertex_group_factor",
5913 "Vertex group strength",
5917 ot->
srna,
"invert_vertex_group",
false,
"Invert",
"Invert vertex group influence");
5935 ot->
srna,
"use_verts", value,
"Dissolve Vertices",
"Dissolve remaining vertices");
5947 "Split off face corners to maintain surrounding geometry");
5952 "use_boundary_tear",
5955 "Split off face corners instead of merging faces");
5964 uint objects_len = 0;
5968 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
5969 Object *obedit = objects[ob_index];
5980 "dissolve_verts verts=%hv use_face_split=%b use_boundary_tear=%b",
5983 use_boundary_tear)) {
5991 .calc_looptri = true,
5992 .calc_normals = false,
5993 .is_destructive = true,
6004 ot->
name =
"Dissolve Vertices";
6005 ot->
description =
"Dissolve vertices, merge edges and faces";
6006 ot->
idname =
"MESH_OT_dissolve_verts";
6031 uint objects_len = 0;
6034 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6035 Object *obedit = objects[ob_index];
6046 "dissolve_edges edges=%he use_verts=%b use_face_split=%b",
6057 .calc_looptri = true,
6058 .calc_normals = false,
6059 .is_destructive = true,
6071 ot->
name =
"Dissolve Edges";
6073 ot->
idname =
"MESH_OT_dissolve_edges";
6096 uint objects_len = 0;
6099 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6100 Object *obedit = objects[ob_index];
6113 "dissolve_faces faces=%hf use_verts=%b",
6123 .calc_looptri = true,
6124 .calc_normals = false,
6125 .is_destructive = true,
6136 ot->
name =
"Dissolve Faces";
6138 ot->
idname =
"MESH_OT_dissolve_faces";
6182 ot->
name =
"Dissolve Selection";
6183 ot->
description =
"Dissolve geometry based on the selection mode";
6184 ot->
idname =
"MESH_OT_dissolve_mode";
6207 const bool use_dissolve_boundaries =
RNA_boolean_get(op->
ptr,
"use_dissolve_boundaries");
6212 uint objects_len = 0;
6215 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6216 Object *obedit = objects[ob_index];
6262 "dissolve_limit edges=%he verts=%hv angle_limit=%f use_dissolve_boundaries=%b delimit=%i",
6266 use_dissolve_boundaries,
6273 .calc_looptri = true,
6274 .calc_normals = false,
6275 .is_destructive = true,
6288 ot->
name =
"Limited Dissolve";
6289 ot->
idname =
"MESH_OT_dissolve_limited";
6291 "Dissolve selected edges and vertices, limited by the angle of surrounding geometry";
6312 "use_dissolve_boundaries",
6315 "Dissolve all vertices in between face boundaries");
6321 "Delimit dissolve operation");
6333 int totelem_old[3] = {0, 0, 0};
6334 int totelem_new[3] = {0, 0, 0};
6336 uint objects_len = 0;
6340 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6341 Object *obedit = objects[ob_index];
6351 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6352 Object *obedit = objects[ob_index];
6365 .calc_looptri = true,
6366 .calc_normals = false,
6367 .is_destructive = true,
6384 ot->
name =
"Degenerate Dissolve";
6385 ot->
idname =
"MESH_OT_dissolve_degenerate";
6386 ot->
description =
"Dissolve zero area faces and zero length edges";
6401 "Maximum distance between elements to merge",
6418 uint objects_len = 0;
6421 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6422 Object *obedit = objects[ob_index];
6448 "dissolve_edges edges=%he use_verts=%b use_face_split=%b",
6461 .calc_looptri = true,
6462 .calc_normals = false,
6463 .is_destructive = true,
6474 ot->
name =
"Delete Edge Loop";
6475 ot->
description =
"Delete an edge loop by merging the faces on each side";
6476 ot->
idname =
"MESH_OT_delete_edgeloop";
6489 "Split off face corners to maintain surrounding geometry");
6501 uint objects_len = 0;
6504 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
6505 Object *obedit = objects[ob_index];
6528 .calc_looptri = true,
6529 .calc_normals = true,
6530 .is_destructive = true,
6543 ot->
description =
"Split off selected geometry from connected unselected geometry";
6591 return (x1->
srt >
x2->srt) - (x1->
srt <
x2->srt);
6617 int totelem[3] = {0, 0, 0};
6618 int affected[3] = {0, 0, 0};
6621 if (!(
types && flag && action)) {
6637 float fact = reverse ? -1.0 : 1.0;
6644 pb = pblock[0] =
MEM_callocN(
sizeof(
char) * totelem[0],
"sort_bmelem vert pblock");
6653 sb[affected[0]].org_idx = i;
6654 sb[affected[0]++].srt = co[coidx] * fact;
6663 pb = pblock[1] =
MEM_callocN(
sizeof(
char) * totelem[1],
"sort_bmelem edge pblock");
6673 sb[affected[1]].org_idx = i;
6674 sb[affected[1]++].srt = co[coidx] * fact;
6683 pb = pblock[2] =
MEM_callocN(
sizeof(
char) * totelem[2],
"sort_bmelem face pblock");
6693 sb[affected[2]].org_idx = i;
6694 sb[affected[2]++].srt = co[coidx] * fact;
6706 float fact = reverse ? -1.0 : 1.0;
6714 pb = pblock[0] =
MEM_callocN(
sizeof(
char) * totelem[0],
"sort_bmelem vert pblock");
6720 sb[affected[0]].org_idx = i;
6730 pb = pblock[1] =
MEM_callocN(
sizeof(
char) * totelem[1],
"sort_bmelem edge pblock");
6739 sb[affected[1]].org_idx = i;
6749 pb = pblock[2] =
MEM_callocN(
sizeof(
char) * totelem[2],
"sort_bmelem face pblock");
6758 sb[affected[2]].org_idx = i;
6770 pb = pblock[2] =
MEM_callocN(
sizeof(
char) * totelem[2],
"sort_bmelem face pblock");
6779 sb[affected[2]].org_idx = i;
6782 sb[affected[2]++].srt = srt * ((
float)totelem[2]) + ((
float)i);
6796 tb = tbuf[0] =
MEM_callocN(
sizeof(
int) * totelem[0],
"sort_bmelem vert tbuf");
6797 mp =
map[0] =
MEM_callocN(
sizeof(
int) * totelem[0],
"sort_bmelem vert map");
6801 mp[affected[0]++] = i;
6811 tb = tbuf[1] =
MEM_callocN(
sizeof(
int) * totelem[1],
"sort_bmelem edge tbuf");
6812 mp =
map[1] =
MEM_callocN(
sizeof(
int) * totelem[1],
"sort_bmelem edge map");
6816 mp[affected[1]++] = i;
6826 tb = tbuf[2] =
MEM_callocN(
sizeof(
int) * totelem[2],
"sort_bmelem face tbuf");
6827 mp =
map[2] =
MEM_callocN(
sizeof(
int) * totelem[2],
"sort_bmelem face map");
6831 mp[affected[2]++] = i;
6841 int tot = totelem[j];
6842 int aff = affected[j];
6848 if (
ELEM(aff, 0, tot)) {
6855 memcpy(tb + (tot - aff), mp, aff *
sizeof(
int));
6858 memcpy(mp + aff, tb, (tot - aff) *
sizeof(
int));
6860 mp =
map[j] = tbuf[j];
6865 for (i = tot, tb = tbuf[j] + tot - 1; i--; tb--) {
6877 pb = pblock[0] =
MEM_callocN(
sizeof(
char) * totelem[0],
"sort_bmelem vert pblock");
6883 sb[affected[0]].org_idx = i;
6896 pb = pblock[1] =
MEM_callocN(
sizeof(
char) * totelem[1],
"sort_bmelem edge pblock");
6902 sb[affected[1]].org_idx = i;
6915 pb = pblock[2] =
MEM_callocN(
sizeof(
char) * totelem[2],
"sort_bmelem face pblock");
6921 sb[affected[2]].org_idx = i;
6935 pb = pblock[0] =
MEM_callocN(
sizeof(
char) * totelem[0],
"sort_bmelem vert pblock");
6941 sb[affected[0]].org_idx = i;
6942 sb[affected[0]++].srt = (
float)-i;
6951 pb = pblock[1] =
MEM_callocN(
sizeof(
char) * totelem[1],
"sort_bmelem edge pblock");
6957 sb[affected[1]].org_idx = i;
6958 sb[affected[1]++].srt = (
float)-i;
6967 pb = pblock[2] =
MEM_callocN(
sizeof(
char) * totelem[2],
"sort_bmelem face pblock");
6973 sb[affected[2]].org_idx = i;
6974 sb[affected[2]++].srt = (
float)-i;
6986 if (affected[0] == 0 && affected[1] == 0 && affected[2] == 0) {
7005 if (pb && sb && !
map[j]) {
7008 int tot = totelem[j];
7009 int aff = affected[j];
7014 p_blk = pb + tot - 1;
7015 s_blk = sb + aff - 1;
7016 for (i = tot; i--; p_blk--) {
7038 .calc_looptri = (totelem[2] != 0),
7039 .calc_normals = false,
7040 .is_destructive = true,
7093 uint objects_len = 0;
7097 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
7098 Object *ob = objects[ob_index];
7108 int seed_iter =
seed;
7130 if (
STREQ(prop_id,
"seed")) {
7138 if (
STREQ(prop_id,
"reverse")) {
7155 "Sort selected elements from farthest to nearest one in current view"},
7160 "Sort selected elements from left to right one in current view"},
7165 "Sort selected elements from nearest to farthest from 3D cursor"},
7170 "Sort selected faces from smallest to greatest material index"},
7175 "Move all selected elements in first places, preserving their relative order.\n"
7176 "Warning: This will affect unselected elements' indices as well"},
7177 {
SRT_RANDOMIZE,
"RANDOMIZE", 0,
"Randomize",
"Randomize order of selected elements"},
7178 {
SRT_REVERSE,
"REVERSE", 0,
"Reverse",
"Reverse current order of selected elements"},
7183 {
BM_VERT,
"VERT", 0,
"Vertices",
""},
7184 {
BM_EDGE,
"EDGE", 0,
"Edges",
""},
7185 {
BM_FACE,
"FACE", 0,
"Faces",
""},
7190 ot->
name =
"Sort Mesh Elements";
7192 "The order of selected vertices/edges/faces is modified, based on a given method";
7193 ot->
idname =
"MESH_OT_sort_elements";
7210 "Type of reordering operation to apply");
7216 "Which elements to affect (vertices, edges and/or faces)");
7218 RNA_def_int(
ot->
srna,
"seed", 0, 0, INT_MAX,
"Seed",
"Seed for random-based operations", 0, 255);
7239 int totface_del = 0;
7250 bool is_all_sel =
true;
7265 if (is_all_sel ==
false) {
7278 const bool use_pairs,
7279 const bool use_cyclic,
7280 const bool use_merge,
7281 const float merge_factor,
7282 const int twist_offset)
7286 int totface_del = 0;
7296 totface_del_arr =
MEM_mallocN(
sizeof(*totface_del_arr) * totface_del, __func__);
7301 totface_del_arr[i++] = f;
7313 "bridge_loops edges=%he use_pairs=%b use_cyclic=%b use_merge=%b merge_factor=%f "
7322 if (use_faces && totface_del) {
7325 for (i = 0; i < totface_del; i++) {
7330 "delete geom=%hf context=%i",
7339 if (use_merge ==
false) {
7345 if (use_merge ==
false) {
7349 if (op_props.
cuts) {
7357 "subdivide_edgering edges=%S interp_mode=%i cuts=%i smooth=%f "
7358 "profile_shape=%i profile_shape_factor=%f",
7374 if (totface_del_arr) {
7381 .calc_looptri =
true,
7382 .calc_normals =
false,
7383 .is_destructive =
true,
7401 uint objects_len = 0;
7404 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
7405 Object *obedit = objects[ob_index];
7413 op, em, obedit->
data, use_pairs, use_cyclic, use_merge, merge_factor, twist_offset);
7429 ot->
name =
"Bridge Edge Loops";
7430 ot->
description =
"Create a bridge of faces between two or more selected edge loops";
7431 ot->
idname =
"MESH_OT_bridge_edge_loops";
7445 "Method of bridging multiple loops");
7448 RNA_def_float(
ot->
srna,
"merge_factor", 0.5f, 0.0f, 1.0f,
"Merge Factor",
"", 0.0f, 1.0f);
7455 "Twist offset for closed loops",
7480 uint objects_len = 0;
7483 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
7484 Object *obedit = objects[ob_index];
7496 "wireframe faces=%hf use_replace=%b use_boundary=%b use_even_offset=%b "
7497 "use_relative_offset=%b "
7498 "use_crease=%b crease_weight=%f thickness=%f offset=%f",
7503 use_relative_offset,
7521 .calc_looptri = true,
7522 .calc_normals = false,
7523 .is_destructive = true,
7554 "Scale the offset to give more even thickness");
7556 "use_relative_offset",
7559 "Scale the offset by surrounding geometry");
7562 ot->
srna,
"thickness", 0.01f, 0.0f, 1e4f,
"Thickness",
"", 0.0f, 10.0f);
7570 "Crease hub edges for an improved subdivision surface");
7572 ot->
srna,
"crease_weight", 0.01f, 0.0f, 1e3f,
"Crease Weight",
"", 0.0f, 1.0f);
7585 bool changed_multi =
false;
7591 for (
uint base_index = 0; base_index < bases_len; base_index++) {
7603 "offset_edgeloops edges=%he use_cap_endpoint=%b",
7617 .calc_looptri = true,
7618 .calc_normals = false,
7619 .is_destructive = true,
7621 changed_multi =
true;
7625 if (changed_multi) {
7644 ot->
name =
"Offset Edge Loop";
7645 ot->
idname =
"MESH_OT_offset_edge_loops";
7646 ot->
description =
"Create offset edge loop from the current selection";
7659 ot->
srna,
"use_cap_endpoint",
false,
"Cap Endpoint",
"Extend loop around end-points");
7680 uint objects_len = 0;
7683 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
7684 Object *obedit = objects[ob_index];
7696 "convex_hull input=%hvef "
7697 "use_existing_faces=%b",
7699 use_existing_faces);
7712 if (delete_unused) {
7714 em, op,
"delete geom=%S context=%i", &bmop,
"geom_unused.out",
DEL_ONLYTAGGED)) {
7723 em, op,
"delete geom=%S context=%i", &bmop,
"geom_holes.out",
DEL_ONLYTAGGED)) {
7730 if (join_triangles) {
7735 "join_triangles faces=%S "
7736 "angle_face_threshold=%f angle_shape_threshold=%f",
7739 angle_face_threshold,
7740 angle_shape_threshold)) {
7752 .calc_looptri = true,
7753 .calc_normals = false,
7754 .is_destructive = true,
7766 ot->
name =
"Convex Hull";
7767 ot->
description =
"Enclose selected vertices in a convex polyhedron";
7768 ot->
idname =
"MESH_OT_convex_hull";
7771 ot->
exec = edbm_convex_hull_exec;
7782 "Delete selected elements that are not used by the hull");
7785 "use_existing_faces",
7787 "Use Existing Faces",
7788 "Skip hull triangles that are covered by a pre-existing face");
7794 "Delete selected faces that are used by the hull");
7797 ot->
srna,
"join_triangles",
true,
"Join Triangles",
"Merge adjacent triangles into quads");
7813 uint objects_len = 0;
7817 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
7818 Object *obedit = objects[ob_index];
7829 "symmetrize input=%hvef direction=%i dist=%f",
7845 .calc_looptri = true,
7846 .calc_normals = false,
7847 .is_destructive = true,
7860 ot->
description =
"Enforce symmetry (both form and topological) across an axis";
7875 "Which sides to copy from and to");
7882 "Limit for snap middle vertices to the axis center",
7895 const float eps = 0.00001f;
7896 const float eps_sq =
eps *
eps;
7897 const bool use_topology =
false;
7905 int totvertfound = 0, totvertmirr = 0, totvertfail = 0;
7908 int axis = axis_dir % 3;
7909 bool axis_sign = axis != axis_dir;
7912 uint objects_len = 0;
7916 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
7917 Object *obedit = objects[ob_index];
7942 int i_mirr = index[i];
7948 float co[3], co_mirr[3];
7950 if ((
v->
co[axis] > v_mirr->
co[axis]) == axis_sign) {
7955 co_mirr[axis] *= -1.0f;
7992 .calc_looptri = false,
7993 .calc_normals = false,
7994 .is_destructive = false,
8005 "%d already symmetrical, %d pairs mirrored, %d failed",
8006 totvertfound - totvertmirr,
8013 "%d already symmetrical, %d pairs mirrored",
8014 totvertfound - totvertmirr,
8024 ot->
name =
"Snap to Symmetry";
8025 ot->
description =
"Snap vertex pairs to their mirrored locations";
8026 ot->
idname =
"MESH_OT_symmetry_snap";
8040 "Which sides to copy from and to");
8047 "Distance within which matching vertices are searched",
8056 "Mix factor of the locations of the vertices",
8060 ot->
srna,
"use_center",
true,
"Center",
"Snap middle vertices to the axis center");
8065 #if defined(WITH_FREESTYLE)
8079 uint objects_len = 0;
8082 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
8083 Object *obedit = objects[ob_index];
8130 ot->
name =
"Mark Freestyle Edge";
8131 ot->
description =
"(Un)mark selected edges as Freestyle feature edges";
8132 ot->
idname =
"MESH_OT_mark_freestyle_edge";
8135 ot->
exec = edbm_mark_freestyle_edge_exec;
8159 uint objects_len = 0;
8162 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
8163 Object *obedit = objects[ob_index];
8208 ot->
name =
"Mark Freestyle Face";
8209 ot->
description =
"(Un)mark selected faces for exclusion from Freestyle feature edge detection";
8210 ot->
idname =
"MESH_OT_mark_freestyle_face";
8213 ot->
exec = edbm_mark_freestyle_face_exec;
8264 "Toggle inversion of affected normals"},
8269 "Interpolate between new and original normals"},
8276 "Follow mouse cursor position"},
8281 "Use current rotation/scaling pivot point coordinates"},
8286 "Use current edited object's location"},
8290 "Set and Use 3D Cursor",
8291 "Set new 3D cursor position and use it"},
8295 "Select and Use Mesh Item",
8296 "Select new active mesh element and use its location"},
8299 static const char *keymap_name =
"Custom Normals Modal Map";
8315 #define CLNORS_VALID_VEC_LEN (1e-4f)
8333 "Use static coordinates (defined by various means)"},
8351 return (lnors_ed_arr->
totloop != 0);
8383 int available_len =
sizeof(buf);
8385 #define WM_MODALKEY(_id) \
8386 WM_modalkeymap_operator_items_to_string_buf( \
8387 op->type, (_id), true, UI_MAX_SHORTCUT_STR, &available_len, &p)
8391 TIP_(
"%s: confirm, %s: cancel, "
8392 "%s: point to mouse (%s), %s: point to Pivot, "
8393 "%s: point to object origin, %s: reset normals, "
8394 "%s: set & point to 3D cursor, %s: select & point to mesh item, "
8395 "%s: invert normals (%s), %s: spherize (%s), %s: align (%s)"),
8445 if (do_align && !do_reset) {
8452 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
8456 else if (do_spherize) {
8460 float spherized_normal[3];
8471 else if (do_align) {
8478 if (do_invert && !do_reset) {
8507 int new_mode = mode;
8508 bool force_mousemove =
false;
8509 bool do_reset =
false;
8514 switch (event->
val) {
8560 force_mousemove =
true;
8647 if (new_mode != mode) {
8675 .calc_looptri = true,
8676 .calc_normals = false,
8677 .is_destructive = false,
8737 .calc_looptri = true,
8738 .calc_normals = false,
8739 .is_destructive = false,
8753 if (
STREQ(prop_id,
"spherize_strength")) {
8778 ot->
name =
"Point Normals to Target";
8779 ot->
description =
"Point selected custom normals to specified Target";
8780 ot->
idname =
"MESH_OT_point_normals";
8798 "How to define coordinates to point custom normals to");
8812 "Target location to which normals will point",
8817 ot->
srna,
"spherize",
false,
"Spherize",
"Interpolate between original and new normals");
8820 "spherize_strength",
8824 "Spherize Strength",
8825 "Ratio of spherized normal to original normal",
8846 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
8857 float avg_normal[3] = {0.0f, 0.0f, 0.0f};
8860 for (; loops; loops = loops->
next) {
8913 const BMEdge *e_org = l_curr->
e;
8914 BMLoop *lfan_pivot, *lfan_pivot_next;
8916 lfan_pivot = l_curr;
8917 e_next = lfan_pivot->
e;
8918 float avg_normal[3] = {0.0f};
8922 if (lfan_pivot_next) {
8926 e_next = (lfan_pivot->
e == e_next) ? lfan_pivot->
prev->
e : lfan_pivot->
e;
8935 lfan_pivot = lfan_pivot_next;
8949 }
while ((l_curr = l_curr->
next) != l_first);
8956 uint objects_len = 0;
8960 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
8961 Object *obedit = objects[ob_index];
9001 .calc_looptri = true,
9002 .calc_normals = false,
9003 .is_destructive = false,
9019 ot->
name =
"Merge Normals";
9020 ot->
description =
"Merge custom normals of selected vertices";
9021 ot->
idname =
"MESH_OT_merge_normals";
9039 ot->
name =
"Split Normals";
9040 ot->
description =
"Split custom normals of selected vertices";
9041 ot->
idname =
"MESH_OT_split_normals";
9068 "Take average of vertex normals"},
9073 "Set all vertex normals by face area"},
9078 "Set all vertex normals by corner angle"},
9085 uint objects_len = 0;
9095 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
9099 Object *obedit = objects[ob_index];
9112 float weight = absweight / 50.0f;
9113 if (absweight == 100.0f) {
9114 weight = (
float)SHRT_MAX;
9116 else if (absweight == 1.0f) {
9117 weight = 1 / (
float)SHRT_MAX;
9119 else if ((weight - 1) * 25 > 1) {
9120 weight = (weight - 1) * 25;
9143 const BMEdge *e_org = l_curr->
e;
9144 BMLoop *lfan_pivot, *lfan_pivot_next;
9146 lfan_pivot = l_curr;
9147 e_next = lfan_pivot->
e;
9151 if (lfan_pivot_next) {
9155 e_next = (lfan_pivot->
e == e_next) ? lfan_pivot->
prev->
e : lfan_pivot->
e;
9171 lfan_pivot = lfan_pivot_next;
9174 float wnor[3], avg_normal[3] = {0.0f},
count = 0;
9186 const float n_weight =
pow(weight,
count);
9197 mul_v3_fl(wnor, (1.0f / cur_val) * (1.0f / n_weight));
9213 }
while ((l_curr = l_curr->
next) != l_first);
9218 .calc_looptri = true,
9219 .calc_normals = false,
9220 .is_destructive = false,
9239 if (
STREQ(prop_id,
"weight")) {
9240 return !is_clor_average_loop;
9242 if (
STREQ(prop_id,
"threshold")) {
9243 return !is_clor_average_loop;
9267 ot->
name =
"Average Normals";
9268 ot->
description =
"Average custom normals of selected vertices";
9269 ot->
idname =
"MESH_OT_average_normals";
9284 "Averaging method");
9286 RNA_def_int(
ot->
srna,
"weight", 50, 1, 100,
"Weight",
"Weight applied per face", 1, 100);
9294 "Threshold value for different weights to be considered equal",
9321 "Multiply normal vector with selection"},
9326 "Reset buffer and/or normal of selected element"},
9334 uint objects_len = 0;
9340 bool done_copy =
false;
9342 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
9343 Object *obedit = objects[ob_index];
9367 "Can only copy one custom normal, vertex normal or face normal");
9371 if (lnors_ed_arr->
totloop == 1) {
9386 bool are_same_lnors =
true;
9387 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
9389 are_same_lnors =
false;
9392 if (are_same_lnors) {
9406 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
9408 float abs_normal[3];
9430 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
9444 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
9459 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
9475 .calc_looptri = true,
9476 .calc_normals = false,
9477 .is_destructive = false,
9493 if (
STREQ(prop_id,
"absolute")) {
9516 ot->
name =
"Normals Vector Tools";
9517 ot->
description =
"Custom normals tools using Normal Vector of UI";
9518 ot->
idname =
"MESH_OT_normals_tools";
9533 "Mode of tools taking input from interface");
9539 "Absolute Coordinates",
9540 "Copy Absolute coordinates or Normal vector");
9552 uint objects_len = 0;
9556 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
9557 Object *obedit = objects[ob_index];
9568 BMIter fiter, viter, eiter, liter;
9605 for (; loops; loops = loops->
next) {
9631 .calc_looptri = true,
9632 .calc_normals = false,
9633 .is_destructive = false,
9644 ot->
name =
"Set Normals from Faces";
9645 ot->
description =
"Set the custom normals from the selected faces ones";
9646 ot->
idname =
"MESH_OT_set_normals_from_faces";
9667 uint objects_len = 0;
9671 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
9672 Object *obedit = objects[ob_index];
9694 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
9696 float loop_normal[3];
9705 add_v3_v3(smooth_normal[i], loop_normal);
9713 for (
int i = 0; i < lnors_ed_arr->
totloop; i++, lnor_ed++) {
9714 float current_normal[3];
9726 mul_v3_fl(current_normal, 1.0f - factor);
9728 add_v3_v3(current_normal, smooth_normal[i]);
9744 .calc_looptri = true,
9745 .calc_normals = false,
9746 .is_destructive = false,
9757 ot->
name =
"Smooth Normals Vectors";
9758 ot->
description =
"Smooth custom normals based on adjacent vertex normals";
9759 ot->
idname =
"MESH_OT_smooth_normals";
9774 "Specifies weight of smooth vs original normal",
9788 uint objects_len = 0;
9792 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
9793 Object *obedit = objects[ob_index];
9805 if (cd_prop_int_index == -1) {
9819 *strength = face_strength;
9826 if (*strength == face_strength) {
9838 .calc_looptri = false,
9839 .calc_normals = false,
9840 .is_destructive = false,
9858 ot->
name =
"Face Normals Strength";
9859 ot->
description =
"Set/Get strength of face (used in Weighted Normal modifier)";
9860 ot->
idname =
"MESH_OT_mod_weighted_strength";
9877 "Strength to use for assigning or selecting face influence for weighted normal modifier");
typedef float(TangentPoint)[2]
Generic geometry attributes built on CustomData.
struct CustomDataLayer * BKE_id_attributes_active_color_get(const struct ID *id)
int BKE_id_attribute_to_index(const struct ID *id, const CustomDataLayer *layer, eAttrDomainMask domain_mask, eCustomDataMask layer_mask)
eAttrDomain BKE_id_attribute_domain(const struct ID *id, const struct CustomDataLayer *layer)
#define ATTR_DOMAIN_MASK_COLOR
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct Object * CTX_data_edit_object(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
CustomData interface, see also DNA_customdata_types.h.
int CustomData_number_of_layers(const struct CustomData *data, int type)
bool CustomData_has_layer(const struct CustomData *data, int type)
int CustomData_get_named_layer_index(const struct CustomData *data, int type, const char *name)
int CustomData_get_layer_index(const struct CustomData *data, int type)
void * CustomData_bmesh_get(const struct CustomData *data, void *block, int type)
int CustomData_get_n_offset(const struct CustomData *data, int type, int n)
int CustomData_get_offset(const struct CustomData *data, int type)
void * CustomData_bmesh_get_n(const struct CustomData *data, void *block, int type, int n)
void BKE_editmesh_lnorspace_update(BMEditMesh *em, struct Mesh *me)
void BKE_editmesh_ensure_autosmooth(BMEditMesh *em, struct Mesh *me)
BMEditMesh * BKE_editmesh_from_object(struct Object *ob)
Return the BMEditMesh for a given object.
struct KeyBlock * BKE_keyblock_find_name(struct Key *key, const char name[])
#define BKE_view_layer_array_from_objects_in_edit_mode(view_layer, v3d, r_len)
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, v3d, r_len)
#define BKE_view_layer_array_from_bases_in_edit_mode_unique_data(view_layer, v3d, r_len)
bool BKE_id_is_editable(const struct Main *bmain, const struct ID *id)
void id_us_plus(struct ID *id)
General operations, lookup, etc. for materials.
struct Material *** BKE_object_material_array_p(struct Object *ob)
struct Material *** BKE_id_material_array_p(struct ID *id)
short * BKE_id_material_len_p(struct ID *id)
void BKE_object_material_resize(struct Main *bmain, struct Object *ob, short totcol, bool do_id_user)
void BKE_object_material_array_assign(struct Main *bmain, struct Object *ob, struct Material ***matar, int totcol, bool to_object_only)
void BKE_id_material_clear(struct Main *bmain, struct ID *id)
short * BKE_object_material_len_p(struct Object *ob)
void BKE_id_material_resize(struct Main *bmain, struct ID *id, short totcol, bool do_id_user)
@ MLNOR_SPACEARR_BMLOOP_PTR
void BKE_lnor_space_custom_data_to_normal(MLoopNorSpace *lnor_space, const short clnor_data[2], float r_custom_lnor[3])
void BKE_lnor_space_custom_normal_to_data(MLoopNorSpace *lnor_space, const float custom_lnor[3], short r_clnor_data[2])
General operations, lookup, etc. for blender objects.
struct Mesh * BKE_object_get_original_mesh(const struct Object *object)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
unsigned int BLI_ghashutil_strhash_p(const void *ptr)
A min-heap / priority queue ADT.
void BLI_heapsimple_free(HeapSimple *heap, HeapSimpleFreeFP ptrfreefp) ATTR_NONNULL(1)
HeapSimple * BLI_heapsimple_new(void) ATTR_WARN_UNUSED_RESULT
float BLI_heapsimple_top_value(const HeapSimple *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_heapsimple_pop_min(HeapSimple *heap) ATTR_NONNULL(1)
bool BLI_heapsimple_is_empty(const HeapSimple *heap) ATTR_NONNULL(1)
void BLI_heapsimple_insert(HeapSimple *heap, float value, void *ptr) ATTR_NONNULL(1)
BLI_LINKSTACK_*** wrapper macros for using a LinkNode to store a stack of pointers,...
#define BLI_SMALLSTACK_DECLARE(var, type)
#define BLI_SMALLSTACK_POP(var)
#define BLI_SMALLSTACK_PUSH(var, data)
#define BLI_SMALLSTACK_IS_EMPTY(var)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_listbase_rotate_first(struct ListBase *lb, void *vlink) ATTR_NONNULL(1
int BLI_listbase_count_at_most(const struct ListBase *listbase, int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findptr(const struct ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE float min_ff(float a, float b)
MINLINE int mod_i(int i, int n)
MINLINE int compare_ff(float a, float b, float max_diff)
int is_quad_flip_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[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_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE bool compare_v3v3(const float a[3], const float b[3], float limit) ATTR_WARN_UNUSED_RESULT
void minmax_v3v3_v3(float min[3], float max[3], const float vec[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_v3(float r[3], const float a[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 mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
MINLINE void negate_v3(float r[3])
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 void copy_v2_fl(float r[2], float f)
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
struct RNG * BLI_rng_new_srandom(unsigned int seed)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_sortutil_cmp_float_reverse(const void *a_, const void *b_)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define UNUSED_VARS_NDEBUG(...)
#define BLT_I18NCONTEXT_ID_CURVE_LEGACY
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_GEOMETRY_ALL_MODES
#define CD_MASK_COLOR_ALL
@ MOD_TRIANGULATE_NGON_BEAUTY
#define MOD_WEIGHTEDNORMALS_FACEWEIGHT_CDLAYER_ID
@ MOD_TRIANGULATE_QUAD_BEAUTY
Object is a sort of wrapper for general info.
#define SCE_SELECT_VERTEX
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_CENTER_MEDIAN
@ OP_IS_MODAL_GRAB_CURSOR
void void EDBM_redo_state_restore_and_free(struct BMBackup *backup, struct BMEditMesh *em, bool recalc_looptri) ATTR_NONNULL(1
bool EDBM_select_pick(struct bContext *C, const int mval[2], const struct SelectPick_Params *params)
void EDBM_verts_mirror_apply(struct BMEditMesh *em, int sel_from, int sel_to)
void EDBM_mesh_stats_multi(struct Object **objects, uint objects_len, int totelem[3], int totelem_sel[3])
void EDBM_update(struct Mesh *me, const struct EDBMUpdate_Params *params)
void ED_mesh_geometry_clear(struct Mesh *mesh)
bool EDBM_mesh_hide(struct BMEditMesh *em, bool swap)
struct BMBackup EDBM_redo_state_store(struct BMEditMesh *em)
bool EDBM_selectmode_disable_multi_ex(struct Scene *scene, struct Base **bases, uint bases_len, short selectmode_disable, short selectmode_fallback)
void EDBM_verts_mirror_cache_begin_ex(struct BMEditMesh *em, int axis, bool use_self, bool use_select, bool respecthide, bool use_topology, float maxdist, int *r_index)
void EDBM_select_flush(struct BMEditMesh *em)
void EDBM_automerge(struct Object *ob, bool update, char hflag, float dist)
void EDBM_verts_mirror_cache_end(struct BMEditMesh *em)
void EDBM_flag_disable_all(struct BMEditMesh *em, char hflag)
bool EDBM_mesh_reveal(struct BMEditMesh *em, bool select)
void EDBM_verts_mirror_cache_begin(struct BMEditMesh *em, int axis, bool use_self, bool use_select, bool respecthide, bool use_topology)
void EDBM_selectmode_flush_ex(struct BMEditMesh *em, short selectmode)
void void void EDBM_redo_state_free(struct BMBackup *backup) ATTR_NONNULL(1)
void EDBM_selectmode_flush(struct BMEditMesh *em)
void EDBM_mesh_normals_update(struct BMEditMesh *em)
void ED_object_base_select(struct Base *base, eObjectSelect_Mode mode)
struct Base * ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct Base *base, eDupli_ID_Flags dupflag)
bool ED_object_calc_active_center_for_editmode(struct Object *obedit, bool select_only, float r_center[3])
void ED_outliner_select_sync_from_object_tag(struct bContext *C)
void ED_area_status_text(ScrArea *area, const char *str)
bool ED_operator_editmesh(struct bContext *C)
bool ED_operator_scene_editable(struct bContext *C)
void ED_uvedit_live_unwrap(const struct Scene *scene, struct Object **objects, int objects_len)
@ V3D_PROJ_TEST_CLIP_NEAR
void ED_view3d_win_to_3d_int(const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3])
void ED_view3d_cursor3d_update(struct bContext *C, const int mval[2], bool use_depth, enum eV3DCursorOrient orientation)
eV3DProjStatus ED_view3d_project_float_object(const struct ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
void view3d_operator_needs_opengl(const struct bContext *C)
struct RegionView3D * ED_view3d_context_rv3d(struct bContext *C)
void ED_view3d_init_mats_rv3d(const struct Object *ob, struct RegionView3D *rv3d)
NSNotificationCenter * center
_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 x2
_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 type
_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 RNA_BEGIN(sptr, itemptr, propname)
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
void uiLayoutSetActive(uiLayout *layout, bool active)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, bool(*check_prop)(struct PointerRNA *ptr, struct PropertyRNA *prop, void *user_data), void *user_data, struct PropertyRNA *prop_activate_init, eButLabelAlign label_align, bool compact)
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
@ OPTYPE_DEPENDS_ON_CURSOR
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
#define BM_elem_cb_check_hflag_disabled_simple(type, hflag_n)
#define BM_DISK_EDGE_NEXT(e, v)
#define BM_FACE_FIRST_LOOP(p)
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
void BM_mesh_copy_init_customdata(BMesh *bm_dst, BMesh *bm_src, const BMAllocTemplate *allocsize)
void BM_mesh_copy_init_customdata_all_layers(BMesh *bm_dst, BMesh *bm_src, const char htype, const BMAllocTemplate *allocsize)
void BM_vert_separate(BMesh *bm, BMVert *v, BMEdge **e_in, int e_in_len, const bool copy_select, BMVert ***r_vout, int *r_vout_len)
void BM_vert_kill(BMesh *bm, BMVert *v)
void BM_face_kill(BMesh *bm, BMFace *f)
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.
void BM_mesh_decimate_collapse(BMesh *bm, float factor, float *vweights, float vweight_factor, bool do_triangulate, int symmetry_axis, float symmetry_eps)
BM_mesh_decimate.
void BM_mesh_delete_hflag_context(BMesh *bm, const char hflag, const int type)
void BM_mesh_edgeloops_free(ListBase *eloops)
int BM_mesh_edgeloops_find(BMesh *bm, ListBase *r_eloops, bool(*test_fn)(BMEdge *, void *user_data), void *user_data)
int BM_edgeloop_length_get(BMEdgeLoopStore *el_store)
bool BM_edgeloop_is_closed(BMEdgeLoopStore *el_store)
void BM_edgeloop_edges_get(struct BMEdgeLoopStore *el_store, BMEdge **e_arr)
ListBase * BM_edgeloop_verts_get(BMEdgeLoopStore *el_store)
bool BMO_error_occurred_at_level(BMesh *bm, eBMOpErrorLevel level)
#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_test_bool(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
void BM_data_layer_add(BMesh *bm, CustomData *data, int type)
void BM_data_layer_add_named(BMesh *bm, CustomData *data, int type, const char *name)
void * BM_iter_at_index(BMesh *bm, const char itype, void *data, int index)
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)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_select_history_clear(BMesh *bm)
void BM_face_select_set(BMesh *bm, BMFace *f, const bool select)
Select Face.
void BM_vert_select_set(BMesh *bm, BMVert *v, const bool select)
Select Vert.
void BM_edge_select_set(BMesh *bm, BMEdge *e, const bool select)
Select Edge.
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
BMVert * BM_mesh_active_vert_get(BMesh *bm)
void BM_mesh_elem_hflag_enable_test(BMesh *bm, const char htype, const char hflag, const bool respecthide, const bool overwrite, const char hflag_test)
#define BM_select_history_store_notest(bm, ele)
#define BM_select_history_store_head_notest(bm, ele)
#define BM_select_history_store(bm, ele)
#define BM_SELECT_HISTORY_BACKUP(bm)
#define BM_SELECT_HISTORY_RESTORE(bm)
const BMAllocTemplate bm_mesh_allocsize_default
void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const uint *face_idx)
void BM_mesh_elem_toolflags_ensure(BMesh *bm)
void BM_mesh_free(BMesh *bm)
BMesh Free Mesh.
BMesh * BM_mesh_create(const BMAllocTemplate *allocsize, const struct BMeshCreateParams *params)
void BM_mesh_elem_table_ensure(BMesh *bm, const char htype)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
BLI_INLINE BMVert * BM_vert_at_index(BMesh *bm, const int index)
void BM_mesh_bm_from_me(BMesh *bm, const Mesh *me, const struct BMeshFromMeshParams *params)
void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMeshParams *params)
void BM_mesh_copy_arrays(BMesh *bm_src, BMesh *bm_dst, BMVert **verts_src, uint verts_src_len, BMEdge **edges_src, uint edges_src_len, BMFace **faces_src, uint faces_src_len)
void BM_lnorspace_update(BMesh *bm)
void BM_normals_loops_edges_tag(BMesh *bm, const bool do_edges)
bool BM_custom_loop_normals_to_vector_layer(BMesh *bm)
void BM_mesh_normals_update(BMesh *bm)
BMLoopNorEditDataArray * BM_loop_normal_editdata_array_init(BMesh *bm, const bool do_all_loops_of_vert)
void BM_loop_normal_editdata_array_free(BMLoopNorEditDataArray *lnors_ed_arr)
bool BM_loop_check_cyclic_smooth_fan(BMLoop *l_curr)
void BM_custom_loop_normals_from_vector_layer(BMesh *bm, bool add_sharp_edges)
@ BMO_SYMMETRIZE_NEGATIVE_X
void * BMO_slot_buffer_alloc(BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int len)
void * BMO_slot_buffer_get_first(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, char hflag, bool do_flush)
BMO_FLAG_BUFFER.
void BMO_slot_buffer_hflag_disable(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, char hflag, bool do_flush)
BMO_FLAG_BUFFER.
@ DEL_FACES_KEEP_BOUNDARY
void BMO_slot_float_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float f)
void BMO_op_exec(BMesh *bm, BMOperator *op)
BMESH OPSTACK EXEC OP.
#define BMO_edge_flag_set(bm, e, oflag, val)
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)
void BMO_slot_int_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int i)
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)
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.
int BMO_slot_buffer_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
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.
#define BMO_FLAG_DEFAULTS
void BMO_slot_bool_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, bool i)
BLI_INLINE void BMO_slot_map_float_insert(BMOperator *op, BMOpSlot *slot, void *element, const float val)
void BM_mesh_esubdivide(BMesh *bm, char edge_hflag, float smooth, short smooth_falloff, bool use_smooth_even, float fractal, float along_normal, int numcuts, int seltype, int cornertype, short use_single_edge, short use_grid_fill, short use_only_quads, int seed)
@ SUBD_RING_INTERP_LINEAR
@ SUBD_CORNER_STRAIGHT_CUT
@ BMOP_POKE_MEDIAN_WEIGHTED
void BM_vert_normal_update(BMVert *v)
bool BM_vert_calc_normal_ex(const BMVert *v, const char hflag, float r_no[3])
float BM_face_calc_area(const BMFace *f)
void BM_face_calc_center_median(const BMFace *f, float r_cent[3])
int BM_mesh_calc_edge_groups_as_arrays(BMesh *bm, BMVert **verts, BMEdge **edges, BMFace **faces, int(**r_groups)[3])
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
bool BM_vert_is_wire(const BMVert *v)
BMFace * BM_edge_pair_share_face_by_len(BMEdge *e_a, BMEdge *e_b, BMLoop **r_l_a, BMLoop **r_l_b, const bool allow_adjacent)
bool BM_edge_face_pair(BMEdge *e, BMFace **r_fa, BMFace **r_fb)
BMLoop * BM_face_edge_share_loop(BMFace *f, BMEdge *e)
Return the Loop Shared by Face and Edge.
bool BM_edge_share_face_check(BMEdge *e1, BMEdge *e2)
float BM_edge_calc_face_angle_ex(const BMEdge *e, const float fallback)
BMESH EDGE/FACE ANGLE.
float BM_loop_calc_face_angle(const BMLoop *l)
BMLoop * BM_vert_step_fan_loop(BMLoop *l, BMEdge **e_step)
BMLoop * BM_face_vert_share_loop(BMFace *f, BMVert *v)
Return the Loop Shared by Face and Vertex.
bool BM_vert_pair_share_face_check_cb(BMVert *v_a, BMVert *v_b, bool(*test_fn)(BMFace *, void *user_data), void *user_data)
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()
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
btMatrix3x3 absolute() const
Return the matrix with all values non negative.
static unsigned long seed
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
bool EDBM_op_callf(BMEditMesh *em, wmOperator *op, const char *fmt,...)
bool EDBM_op_init(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const char *fmt,...)
bool EDBM_op_call_and_selectf(BMEditMesh *em, wmOperator *op, const char *select_slot_out, const bool select_extend, const char *fmt,...)
bool EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const bool do_report)
bool EDBM_view3d_poll(bContext *C)
BLI_INLINE float fb(float length, float L)
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
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 float3 pow(float3 v, float e)
void MESH_OT_convex_hull(struct wmOperatorType *ot)
static void clear(Message *msg)
SocketIndexByIdentifierMap * map
smooth(Type::FLOAT, "mask_weight")
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
int RNA_collection_length(PointerRNA *ptr, const char *name)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
const char * RNA_property_identifier(const PropertyRNA *prop)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
PropertyRNA * RNA_def_float_distance(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
PropertyRNA * RNA_def_float_vector_xyz(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
PropertyRNA * RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem rna_enum_mesh_delimit_mode_items[]
const EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[]
const EnumPropertyItem rna_enum_axis_xyz_items[]
const EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[]
const EnumPropertyItem DummyRNA_NULL_items[]
const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[]
const EnumPropertyItem rna_enum_symmetrize_direction_items[]
struct BMEditSelection * next
struct BMEditSelection * prev
BMLoopNorEditData ** lidx_to_lnor_editdata
BMLoopNorEditData * lnor_editdata
int cd_custom_normal_offset
struct BMLoop * radial_next
struct BMOpSlot slots_out[BMO_OP_MAX_SLOTS]
struct BMOpSlot slots_in[BMO_OP_MAX_SLOTS]
struct MLoopNorSpaceArray * lnor_spacearr
float profile_shape_factor
MLoopNorSpace ** lspacearr
struct BMEditMesh * edit_mesh
struct ToolSettings * toolsettings
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
bool(* poll_property)(const struct bContext *C, struct wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
void(* ui)(struct bContext *, struct wmOperator *)
bool(* check)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
void WM_cursor_wait(bool val)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
bool WM_operator_poll(bContext *C, wmOperatorType *ot)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
#define ISMOUSE_MOTION(event_type)
int WM_gesture_lines_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_lines_invoke(bContext *C, wmOperator *op, const wmEvent *event)
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)
void WM_operatortype_props_advanced_begin(wmOperatorType *ot)
void WM_operator_type_modal_from_exec_for_object_edit_coords(wmOperatorType *ot)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))