diff options
-rw-r--r-- | source/blender/blenkernel/BKE_multires.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h index f924905bfde..5cafd24c1fd 100644 --- a/source/blender/blenkernel/BKE_multires.h +++ b/source/blender/blenkernel/BKE_multires.h @@ -80,7 +80,7 @@ int multires_mdisp_corners(struct MDisps *s); void multires_mdisp_smooth_bounds(struct MDisps *disps); /* update multires data after topology changing */ -void multires_topology_changed(struct Object *ob); +void multires_topology_changed(struct Scene *scene, struct Object *ob); /**** interpolation stuff ****/ void old_mdisps_bilinear(float out[3], float (*disps)[3], int st, float u, float v); diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 0fb19685f25..c67abc47e6f 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -1720,11 +1720,15 @@ void multiresModifier_prepare_join(Scene *scene, Object *ob, Object *to_ob) } /* update multires data after topology changing */ -void multires_topology_changed(Object *ob) +void multires_topology_changed(Scene *scene, Object *ob) { Mesh *me= (Mesh*)ob->data; MDisps *mdisp= NULL, *cur= NULL; int i, grid= 0, corners; + MultiresModifierData *mmd= get_multires_modifier(scene, ob); + + if(mmd) + multires_set_tot_mdisps(me, mmd->totlvl); CustomData_external_read(&me->fdata, &me->id, CD_MASK_MDISPS, me->totface); mdisp= CustomData_get_layer(&me->fdata, CD_MDISPS); diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index 581a678b5c4..d1efb60b618 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -1311,7 +1311,7 @@ void load_editMesh(Scene *scene, Object *obedit) mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL); /* topology could be changed, ensure mdisps are ok */ - multires_topology_changed(obedit); + multires_topology_changed(scene, obedit); } void remake_editMesh(Scene *scene, Object *ob) |