diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2012-01-23 05:35:14 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2012-01-23 05:35:14 +0400 |
commit | 37e128504257db0c37e31f26a626b2f92b2d10db (patch) | |
tree | 222568955cc69f16799ed2207d5e3976015b756a /source/blender/blenloader | |
parent | 62963525ced6a6a286d44eac9cca952aead2ac3f (diff) |
Cloth: Add "velocity damping" to damping options. This will help with the "cloth wobbling" problem which accurs quite often when having animated characters with cloth.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 28f00f355de..0a92d2ca544 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -13038,6 +13038,20 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* put compatibility code here until next subversion bump */ { + { + Object *ob; + for(ob=main->object.first; ob; ob= ob->id.next) { + ModifierData *md; + + for (md=ob->modifiers.first; md; md=md->next) { + if (md->type==eModifierType_Cloth) { + ClothModifierData *clmd = (ClothModifierData*) md; + if(clmd->sim_parms) + clmd->sim_parms->vel_damping = 1.0f; + } + } + } + } } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ |