Read external mdisp when hamdling topology changes
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 5 Nov 2010 14:00:31 +0000 (14:00 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 5 Nov 2010 14:00:31 +0000 (14:00 +0000)
source/blender/blenkernel/intern/multires.c

index 329ef377c52ff94c64a5c0f67a399cae72ac2bbd..f4e9dcf742b0b14551a905fadfaf5e8a14b9ae89 100644 (file)
@@ -1613,9 +1613,12 @@ void multiresModifier_prepare_join(Scene *scene, Object *ob, Object *to_ob)
 void multires_topology_changed(Object *ob)
 {
        Mesh *me= (Mesh*)ob->data;
-       MDisps *mdisp= CustomData_get_layer(&me->fdata, CD_MDISPS);
+       MDisps *mdisp= NULL;
        int i;
 
+       CustomData_external_read(&me->fdata, &me->id, CD_MASK_MDISPS, me->totface);
+       mdisp= CustomData_get_layer(&me->fdata, CD_MDISPS);
+
        if(!mdisp) return;
 
        for(i = 0; i < me->totface; i++, mdisp++) {