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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-07-14 12:13:20 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-07-14 12:13:56 +0300
commit6ba4a917a3006063427972fedf20b4db092fc646 (patch)
treeaa9aa5ff57c505dbcf14150e16d134bea2af3e86 /source/blender/blenkernel/intern/mesh_remap.c
parent85004461ea374cceba6af1b4ec41d0d726133617 (diff)
Data Transfer: very minor cleanup...
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_remap.c')
-rw-r--r--source/blender/blenkernel/intern/mesh_remap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c
index 6ef167cc81f..8a2f239e4f0 100644
--- a/source/blender/blenkernel/intern/mesh_remap.c
+++ b/source/blender/blenkernel/intern/mesh_remap.c
@@ -1443,7 +1443,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
bool pcent_dst_valid = false;
if ((size_t)mp_dst->totloop > islands_res_buff_size) {
- islands_res_buff_size = (size_t)mp_dst->totloop;
+ islands_res_buff_size = (size_t)mp_dst->totloop + MREMAP_DEFAULT_BUFSIZE;
for (tindex = 0; tindex < num_trees; tindex++) {
islands_res[tindex] = MEM_reallocN(islands_res[tindex], sizeof(**islands_res) * islands_res_buff_size);
}
@@ -1539,7 +1539,7 @@ void BKE_mesh_remap_calc_loops_from_dm(
}
}
best_nor_dot = (best_nor_dot + 1.0f) * 0.5f;
- islands_res[tindex][plidx_dst].factor = hit_dist ? (1.0f / hit_dist * best_nor_dot) : 1e18f;
+ islands_res[tindex][plidx_dst].factor = hit_dist ? (best_nor_dot / hit_dist) : 1e18f;
islands_res[tindex][plidx_dst].hit_dist = hit_dist;
islands_res[tindex][plidx_dst].index_src = best_index_src;
}