Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/bmesh/tools')
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c4
-rw-r--r--source/blender/bmesh/tools/bmesh_bisect_plane.c2
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c7
-rw-r--r--source/blender/bmesh/tools/bmesh_intersect.c6
-rw-r--r--source/blender/bmesh/tools/bmesh_region_match.c3
-rw-r--r--source/blender/bmesh/tools/bmesh_wireframe.c2
6 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index cef97f20a6a..d39fb5e81f1 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -7361,7 +7361,6 @@ static float geometry_collide_offset(BevelParams *bp, EdgeHalf *eb)
static float vertex_collide_offset(BevelParams *bp, EdgeHalf *ea)
{
float no_collide_offset = bp->offset + 1e6;
- float limit = no_collide_offset;
if (bp->offset == 0.0f) {
return no_collide_offset;
}
@@ -7373,8 +7372,7 @@ static float vertex_collide_offset(BevelParams *bp, EdgeHalf *ea)
if (kab <= 0.0f) {
return no_collide_offset;
}
- limit = la / kab;
- return limit;
+ return la / kab;
}
/**
diff --git a/source/blender/bmesh/tools/bmesh_bisect_plane.c b/source/blender/bmesh/tools/bmesh_bisect_plane.c
index e7d0fe6a0c6..8f03b86b859 100644
--- a/source/blender/bmesh/tools/bmesh_bisect_plane.c
+++ b/source/blender/bmesh/tools/bmesh_bisect_plane.c
@@ -368,7 +368,7 @@ static void bm_face_bisect_verts(
}
}
- /* Ideally wont happen, but it can for self intersecting faces. */
+ /* Ideally won't happen, but it can for self-intersecting faces. */
// BLI_assert(found == true);
/* In fact this simple test is good enough, test if the loops are adjacent. */
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index 869856d0c5b..82878c7618a 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -1285,6 +1285,11 @@ static bool bm_decim_edge_collapse(BMesh *bm,
* a vertex group is the usual source for this.
* \param symmetry_axis: Axis of symmetry, -1 to disable mirror decimate.
* \param symmetry_eps: Threshold when matching mirror verts.
+ *
+ * \note The caller is responsible for recalculating face and vertex normals.
+ * - Vertex normals are maintained while decimating,
+ * although they won't necessarily match the final recalculated normals.
+ * - Face normals are not maintained at all.
*/
void BM_mesh_decimate_collapse(BMesh *bm,
const float factor,
@@ -1367,7 +1372,7 @@ void BM_mesh_decimate_collapse(BMesh *bm,
/* handy to detect corruptions elsewhere */
BLI_assert(BM_elem_index_get(e) < tot_edge_orig);
- /* Under normal conditions wont be accessed again,
+ /* Under normal conditions won't be accessed again,
* but NULL just in case so we don't use freed node. */
eheap_table[BM_elem_index_get(e)] = NULL;
diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c
index 710d7f79637..cc980a81aad 100644
--- a/source/blender/bmesh/tools/bmesh_intersect.c
+++ b/source/blender/bmesh/tools/bmesh_intersect.c
@@ -560,8 +560,8 @@ static void bm_isect_tri_tri(
/* vert-vert
* --------- */
{
- /* first check in any verts are touching
- * (any case where we wont create new verts)
+ /* first check if any verts are touching
+ * (any case where we won't create new verts)
*/
uint i_a;
for (i_a = 0; i_a < 3; i_a++) {
@@ -1606,7 +1606,7 @@ bool BM_mesh_intersect(BMesh *bm,
for (node = s.vert_dissolve; node; node = node->next) {
BMVert *v = node->link;
if (BM_vert_is_edge_pair(v)) {
- /* we wont create degenerate faces from this */
+ /* we won't create degenerate faces from this */
bool ok = true;
/* would we create a 2-sided-face?
diff --git a/source/blender/bmesh/tools/bmesh_region_match.c b/source/blender/bmesh/tools/bmesh_region_match.c
index 561b00544b5..c538d5b17cd 100644
--- a/source/blender/bmesh/tools/bmesh_region_match.c
+++ b/source/blender/bmesh/tools/bmesh_region_match.c
@@ -553,7 +553,8 @@ static void bm_uuidwalk_pass_add(UUIDWalk *uuidwalk,
static int bm_face_len_cmp(const void *v1, const void *v2)
{
- const BMFace *f1 = v1, *f2 = v2;
+ const BMFace *f1 = *((BMFace **)v1);
+ const BMFace *f2 = *((BMFace **)v2);
if (f1->len > f2->len) {
return 1;
diff --git a/source/blender/bmesh/tools/bmesh_wireframe.c b/source/blender/bmesh/tools/bmesh_wireframe.c
index 1c820db74f4..a3db93be033 100644
--- a/source/blender/bmesh/tools/bmesh_wireframe.c
+++ b/source/blender/bmesh/tools/bmesh_wireframe.c
@@ -63,7 +63,7 @@ static void bm_vert_boundary_tangent(
float tvec_a[3], tvec_b[3];
/* get 2 boundary edges, there should only _be_ 2,
- * in case there are more - results wont be valid of course */
+ * in case there are more - results won't be valid of course */
BM_ITER_ELEM (e_iter, &iter, v, BM_EDGES_OF_VERT) {
if (BM_elem_flag_test(e_iter, BM_ELEM_TAG)) {
if (e_a == NULL) {