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-05-16 14:43:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-16 14:43:18 +0400
commitb214ea3aa402fe8d377de38276a068456a5c5223 (patch)
treef49f05b9fe46ad503baa15098ef70cf9f93e4035 /source/blender/blenkernel/intern/customdata.c
parent66181332814f3128254622eada820a42a968c10b (diff)
svn merge ^/trunk/blender -c56620 -c56639 -c56643 -c56647 -c56648 -c56650 -c56651 -c56653 -c56654 -c56661 -c56662 -c56663 -c56668 -c56670 -c56671 -c56672 -c56673 -c56674 -c56676 -c56678 -c56679 -c56680 -c56682 -c56688 -c56689 -c56698 -c56700 -c56707 -c56711 -c56735 -c56745 -c56747 -c56748 -c56749 -c56755 -c56756 -c56759 -c56760 -c56763 -c56766 -c56767 -c56773 -c56778 -c56783 -c56784 -c56785 -c56790 -c56791 -c56793 -c56800 -c56806 -c56807 -c56809 -c56815 -c56816 -c56820
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.c')
-rw-r--r--source/blender/blenkernel/intern/customdata.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 2118bbcd42b..9e71a5e553e 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -239,12 +239,16 @@ static void layerInterp_mdeformvert(void **sources, const float *weights,
for (j = 0; j < source->totweight; ++j) {
MDeformWeight *dw = &source->dw[j];
+ float weight = dw->weight * interp_weight;
+
+ if (weight == 0.0f)
+ continue;
for (node = dest_dw; node; node = node->next) {
MDeformWeight *tmp_dw = (MDeformWeight *)node->link;
if (tmp_dw->def_nr == dw->def_nr) {
- tmp_dw->weight += dw->weight * interp_weight;
+ tmp_dw->weight += weight;
break;
}
}
@@ -254,7 +258,7 @@ static void layerInterp_mdeformvert(void **sources, const float *weights,
MDeformWeight *tmp_dw = MEM_callocN(sizeof(*tmp_dw),
"layerInterp_mdeformvert tmp_dw");
tmp_dw->def_nr = dw->def_nr;
- tmp_dw->weight = dw->weight * interp_weight;
+ tmp_dw->weight = weight;
BLI_linklist_prepend(&dest_dw, tmp_dw);
totweight++;
}