Don't wait for sculpt stroke to create PBVH.
[blender.git] / source / blender / modifiers / intern / MOD_multires.c
index 00572eaad86c3997296a3e1cc28fc4ad25175a40..f983204945a0c746df89449e6eab5b25cc9a23bc 100644 (file)
@@ -71,8 +71,6 @@ static void copyData(ModifierData *md, ModifierData *target)
 static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
                                                   int useRenderParams, int isFinalCalc)
 {
 static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
                                                   int useRenderParams, int isFinalCalc)
 {
-       SculptSession *ss= ob->sculpt;
-       int sculpting= (ob->mode & OB_MODE_SCULPT) && ss;
        MultiresModifierData *mmd = (MultiresModifierData*)md;
        DerivedMesh *result;
        Mesh *me= (Mesh*)ob->data;
        MultiresModifierData *mmd = (MultiresModifierData*)md;
        DerivedMesh *result;
        Mesh *me= (Mesh*)ob->data;
@@ -94,11 +92,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
                result->release(result);
                result= cddm;
        }
                result->release(result);
                result= cddm;
        }
-       else if(sculpting) {
-               /* would be created on the fly too, just nicer this
-                * way on first stroke after e.g. switching levels */
-               ss->pbvh= result->getPBVH(ob, result);
-       }
 
        return result;
 }
 
        return result;
 }