Fix #30268: cloth collision and springs not working after bmesh merge,
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 23 Feb 2012 21:07:22 +0000 (21:07 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 23 Feb 2012 21:07:22 +0000 (21:07 +0000)
these cloth and collision modifiers require tesselation still.

source/blender/modifiers/intern/MOD_cloth.c
source/blender/modifiers/intern/MOD_collision.c

index fdb584e..51ba910 100644 (file)
@@ -89,6 +89,8 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
 
        CDDM_apply_vert_coords(dm, vertexCos);
 
+       DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+
        clothModifier_do(clmd, md->scene, ob, dm, vertexCos);
 
        if(result) {
index 92ef79b..1476c79 100644 (file)
@@ -166,6 +166,8 @@ static void deformVerts(ModifierData *md, Object *ob,
 
                                collmd->numverts = numverts;
                                
+                               DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+
                                collmd->mfaces = dm->dupTessFaceArray(dm);
                                collmd->numfaces = dm->getNumTessFaces(dm);