merge with/from trunk at r35190
[blender.git] / source / blender / modifiers / intern / MOD_multires.c
index 7653511da10bf360631906a05374cc5976b2c80e..b61302d118b3c85878204e3e24a6b5adc86f8c57 100644 (file)
@@ -80,7 +80,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
        Mesh *me= (Mesh*)ob->data;
 
        if(mmd->totlvl) {
-               if(!CustomData_get_layer(&me->fdata, CD_MDISPS)) {
+               if(!CustomData_get_layer(&me->ldata, CD_MDISPS)) {
                        /* multires always needs a displacement layer */
                        CustomData_add_layer(&me->fdata, CD_MDISPS, CD_CALLOC, NULL, me->totface);
                }
@@ -92,7 +92,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
                return dm;
 
        if(useRenderParams || !isFinalCalc) {
-               DerivedMesh *cddm= CDDM_copy(result);
+               DerivedMesh *cddm= CDDM_copy(result, 0);
                result->release(result);
                result= cddm;
        }