[Bf-blender-cvs] [1455023e64] master: Fix T49807: Inset faces edge rail bug

Campbell Barton noreply at git.blender.org
Thu Jan 19 00:37:35 CET 2017


Commit: 1455023e643044a6d1d220a0a27a67e344c699a9
Author: Campbell Barton
Date:   Thu Jan 19 10:35:10 2017 +1100
Branches: master
https://developer.blender.org/rB1455023e643044a6d1d220a0a27a67e344c699a9

Fix T49807: Inset faces edge rail bug

===================================================================

M	source/blender/bmesh/operators/bmo_inset.c

===================================================================

diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index c52c608e67..e2ff09669d 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -647,6 +647,10 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
 	} (void)0
 #define VERT_ORIG_GET(_v)  \
 	(const float *)BLI_ghash_lookup_default(vert_coords, (_v), (_v)->co)
+	/* memory for the coords isn't given back to the arena,
+	 * acceptable in this case since it runs a fixed number of times. */
+#define VERT_ORIG_REMOVE(_v)  \
+	BLI_ghash_remove(vert_coords, (_v), NULL, NULL)
 
 
 	for (i = 0, es = edge_info; i < edge_info_len; i++, es++) {
@@ -972,7 +976,11 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
 								v_glue = v_split;
 							}
 							else {
-								BM_vert_splice(bm, v_glue, v_split);
+								if (BM_vert_splice(bm, v_glue, v_split)) {
+									if (use_vert_coords_orig) {
+										VERT_ORIG_REMOVE(v_split);
+									}
+								}
 							}
 						}
 					}




More information about the Bf-blender-cvs mailing list