diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2008-01-26 00:47:43 +0300 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2008-01-26 00:47:43 +0300 |
commit | a1a9e011b8d1f545a5db3144b22b48a7a4df2786 (patch) | |
tree | 9f6ec6d6fc763dcf4483958fab1c650e673f357d | |
parent | a01a606b1fdc2f855d84f855033116cc2ff5191d (diff) |
untested fixes for vgroups
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 8ffb7ef2d19..b5bd1c68dda 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -945,19 +945,22 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short { if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) { - verts->goal = dvert->dw [j].weight; - goalfac= 1.0f; - - /* - // Kicking goal factor to simplify things...who uses that anyway? - // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); - */ - - verts->goal = ( float ) pow ( verts->goal , 4.0f ); - if ( verts->goal >=SOFTGOALSNAP ) - verts->flags |= CLOTH_VERT_FLAG_PINNED; - - break; + if(mode==0) + { + verts->goal = dvert->dw [j].weight; + goalfac= 1.0f; + + /* + // Kicking goal factor to simplify things...who uses that anyway? + // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); + */ + + verts->goal = ( float ) pow ( verts->goal , 4.0f ); + if ( verts->goal >=SOFTGOALSNAP ) + verts->flags |= CLOTH_VERT_FLAG_PINNED; + + break; + } } if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) @@ -966,12 +969,13 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short { verts->struct_stiff = dvert->dw [j].weight; verts->shear_stiff = dvert->dw [j].weight; + break; } else if(mode==1) { verts->bend_stiff = dvert->dw [j].weight; + break; } - break; } } |