From c4ef2e2f2ebcd9967aa5d4b283ac7abe51156d51 Mon Sep 17 00:00:00 2001 From: Luca Rood Date: Fri, 14 Sep 2018 15:46:55 +0200 Subject: Cloth: Improve UI This reorganizes the cloth UI, and changes some of the behaviour to be more reasonable. Changes included here: * Reorganized cloth panels * Improved some tooltips * Removed `vel_damping` option * Removed cloth pinning checkbox * Removed stiffness scaling checkbox * Separated shrinking from sewing * Separated self collisions from object collisions Reviewed By: brecht Differential Revision: http://developer.blender.org/D3691 --- source/blender/blenloader/intern/versioning_280.c | 29 +++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 3cf65330b3e..e763f234f2e 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1875,9 +1875,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } - { /* Versioning code for Subsurf modifier. */ if (!DNA_struct_elem_find(fd->filesdna, "SubsurfModifier", "short", "uv_smooth")) { for (Object *object = bmain->object.first; object != NULL; object = object->id.next) { @@ -1956,5 +1954,32 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + for (Object *ob = bmain->object.first; ob; ob = ob->id.next) { + for (ModifierData *md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Cloth) { + ClothModifierData *clmd = (ClothModifierData *)md; + + if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL)) { + clmd->sim_parms->vgroup_mass = 0; + } + + if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING)) { + clmd->sim_parms->vgroup_struct = 0; + clmd->sim_parms->vgroup_shear = 0; + clmd->sim_parms->vgroup_bend = 0; + } + + if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SEW)) { + clmd->sim_parms->shrink_min = 0.0f; + clmd->sim_parms->vgroup_shrink = 0; + } + + if (!(clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED)) { + clmd->coll_parms->flags &= ~CLOTH_COLLSETTINGS_FLAG_SELF; + } + } + } + } } } -- cgit v1.2.3