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>2013-04-11 04:23:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-11 04:23:09 +0400
commite2a37db1d1c3a38b203159fdd5c0260ff6583d81 (patch)
tree906f904824fab33e3a4015d299897c25e7b66954 /source/blender/bmesh
parent1143b658a06a734c5916445c097cb69dee164875 (diff)
fix own mistake in recent inset-interpolation option, some faces were not interpolating.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/operators/bmo_inset.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index f799d589b3c..2324360291d 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -472,13 +472,22 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
/* initialize interpolation vars */
/* this could go in its own loop,
- * only use the 'es->l->f' so we don't store loops for faces which have no mixed selection */
+ * only use the 'es->l->f' so we don't store loops for faces which have no mixed selection
+ *
+ * note: faces on the other side of the inset will be interpolated too since this is hard to
+ * detect, just allow it even though it will cause some redundant interpolation */
if (use_interpolate) {
- const int j = BM_elem_index_get((f = es->l->f));
- if (iface_array[j] == NULL) {
- InterpFace *iface = BLI_memarena_alloc(interp_arena, sizeof(*iface));
- bm_interp_face_store(iface, bm, f, interp_arena);
- iface_array[j] = iface;
+ BMIter viter;
+ BM_ITER_ELEM (v, &viter, es->l->e, BM_VERTS_OF_EDGE) {
+ BMIter fiter;
+ BM_ITER_ELEM (f, &fiter, v, BM_FACES_OF_VERT) {
+ const int j = BM_elem_index_get(f);
+ if (iface_array[j] == NULL) {
+ InterpFace *iface = BLI_memarena_alloc(interp_arena, sizeof(*iface));
+ bm_interp_face_store(iface, bm, f, interp_arena);
+ iface_array[j] = iface;
+ }
+ }
}
}
/* done interpolation */