diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2008-03-06 04:21:40 +0300 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2008-03-06 04:21:40 +0300 |
commit | 3ebcb390906a2d0e4685d3fbf374c7a5eb740874 (patch) | |
tree | 3ad40256809d27ad4dc361c3efb7e99cff0fe6dc /source/blender/blenkernel/intern/cloth.c | |
parent | 18fc43950d84995c7433295e8dfce065dc08ae67 (diff) |
Cloth bugfix for jumpy cloth (users were complaining), so the mass can be changed on GUI now (reference: in old blendfiles, mass=1.0 was used)
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index ee857805fb5..f312a331975 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -970,9 +970,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm ) (clmd->sim_parms->vgroup_bend>0))) { for ( i = 0; i < numverts; i++, verts++ ) - { - verts->mass = 1.0; // standard mass - + { dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT ); if ( dvert ) { @@ -1029,6 +1027,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d float tnull[3] = {0,0,0}; int cache_there = 0; Cloth *cloth = NULL; + MFace *mfaces = NULL; // If we have a clothObject, free it. if ( clmd->clothObject != NULL ) @@ -1091,7 +1090,8 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d } /* no GUI interface yet */ - verts->mass = clmd->sim_parms->mass = 1.0f; + verts->mass = clmd->sim_parms->mass; + verts->impulse_count = 0; if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) verts->goal= clmd->sim_parms->defgoal; |