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-07-13 23:18:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-13 23:20:31 +0300
commiteee2d8e45c4fda2adf8149cefa8ce6899775b81f (patch)
treee6684b5526c43ac59d2156228d306400d04586ab /source/blender/blenkernel/intern/softbody.c
parent240646f5068b85b6ca30fbc14328fbd34719e3df (diff)
Fix T45247: Softbody ignores lattice weight
Now multiply the lattice wight by the goal weight too.
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r--source/blender/blenkernel/intern/softbody.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index a9b2790d820..055c3a86d0e 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -3494,6 +3494,9 @@ static void lattice_to_softbody(Scene *scene, Object *ob)
if ((ob->softflag & OB_SB_GOAL) && (defgroup_index != -1)) {
bp->goal *= defvert_find_weight(&lt->dvert[a], defgroup_index);
}
+ else {
+ bp->goal *= bpnt->weight;
+ }
if (defgroup_index_mass != -1) {
bp->mass *= defvert_find_weight(&lt->dvert[a], defgroup_index_mass);
@@ -3555,7 +3558,7 @@ static void curve_surf_to_softbody(Scene *scene, Object *ob)
/* not too hard to do, but needs some more code to care for; some one may want look at it JOW 2010/06/12*/
for (bezt=nu->bezt, a=0; a<nu->pntsu; a++, bezt++, bp+=3, curindex+=3) {
if (setgoal) {
- bp->goal= bezt->weight;
+ bp->goal *= bezt->weight;
/* all three triples */
(bp+1)->goal= bp->goal;
@@ -3590,7 +3593,7 @@ static void curve_surf_to_softbody(Scene *scene, Object *ob)
else {
for (bpnt=nu->bp, a=0; a<nu->pntsu*nu->pntsv; a++, bpnt++, bp++, curindex++) {
if (setgoal) {
- bp->goal= bpnt->weight;
+ bp->goal *= bpnt->weight;
}
if (totspring && a>0) {
bs->v1= curindex-1;