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:
authorCampbell Barton <ideasman42@gmail.com>2015-04-19 07:21:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-04-19 07:46:32 +0300
commit9ac618a90eddf90071a1d94fa2ae076ce239c785 (patch)
tree5c9dcf6d1f8a6d6e68df302c2ae8ceaff387bd9e /source/blender/blenkernel
parent3d55859924713aada6f35ca7d9a0ed270bdad08b (diff)
Sculpt: smooth brush, exclude self from average
Was including the vertices own location when accumulating.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_mesh.h13
-rw-r--r--source/blender/blenkernel/intern/mesh.c15
2 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 05c20410458..c0d8902eb71 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -69,12 +69,13 @@ extern "C" {
struct BMesh *BKE_mesh_to_bmesh(struct Mesh *me, struct Object *ob);
-int poly_find_loop_from_vert(const struct MPoly *poly,
- const struct MLoop *loopstart,
- unsigned vert);
-
-int poly_get_adj_loops_from_vert(unsigned r_adj[3], const struct MPoly *poly,
- const struct MLoop *mloop, unsigned vert);
+int poly_find_loop_from_vert(
+ const struct MPoly *poly,
+ const struct MLoop *loopstart,
+ unsigned vert);
+int poly_get_adj_loops_from_vert(
+ unsigned r_adj[2], const struct MPoly *poly,
+ const struct MLoop *mloop, unsigned vert);
int BKE_mesh_edge_other_vert(const struct MEdge *e, int v);
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 840ef473691..eec2b108ca3 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -1821,8 +1821,9 @@ float (*BKE_mesh_vertexCos_get(const Mesh *me, int *r_numVerts))[3]
* Find the index of the loop in 'poly' which references vertex,
* returns -1 if not found
*/
-int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart,
- unsigned vert)
+int poly_find_loop_from_vert(
+ const MPoly *poly, const MLoop *loopstart,
+ unsigned vert)
{
int j;
for (j = 0; j < poly->totloop; j++, loopstart++) {
@@ -1838,20 +1839,22 @@ int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart,
* vertex. Returns the index of the loop matching vertex, or -1 if the
* vertex is not in \a poly
*/
-int poly_get_adj_loops_from_vert(unsigned r_adj[3], const MPoly *poly,
- const MLoop *mloop, unsigned vert)
+int poly_get_adj_loops_from_vert(
+ unsigned r_adj[2], const MPoly *poly,
+ const MLoop *mloop, unsigned vert)
{
int corner = poly_find_loop_from_vert(poly,
&mloop[poly->loopstart],
vert);
if (corner != -1) {
+#if 0 /* unused - this loop */
const MLoop *ml = &mloop[poly->loopstart + corner];
+#endif
/* vertex was found */
r_adj[0] = ME_POLY_LOOP_PREV(mloop, poly, corner)->v;
- r_adj[1] = ml->v;
- r_adj[2] = ME_POLY_LOOP_NEXT(mloop, poly, corner)->v;
+ r_adj[1] = ME_POLY_LOOP_NEXT(mloop, poly, corner)->v;
}
return corner;