== Multires ==

Partial fix for bug #7013, adding multires removes all vertex color layers

* Added a warning when adding multires levels to a mesh with more than one vcol layer. The user can choose to allow multires to delete the non-active layer(s), or cancel.

Note that this is a temporary fix; a better solution will be to make multiple vcol layers work with multires.
This commit is contained in:
Nicholas Bishop
2007-08-13 21:08:52 +00:00
parent cb79780abe
commit d098c61bd2

View File

@@ -823,14 +823,21 @@ void multires_add_level(void *ob, void *me_v)
{
int i,j, curf, cure;
Mesh *me= me_v;
MultiresLevel *lvl= MEM_callocN(sizeof(MultiresLevel), "multireslevel");
MultiresLevel *lvl= NULL;
MultiApplyData data;
MVert *oldverts= NULL;
multires_check_state();
if(CustomData_number_of_layers(G.obedit ? &G.editMesh->fdata : &me->fdata, CD_MCOL) > 1) {
int ret= okee("Adding a level will delete all but the active vertex color layer, proceed?");
if(!ret)
return;
}
waitcursor(1);
lvl= MEM_callocN(sizeof(MultiresLevel), "multireslevel");
if(me->pv) sculptmode_pmv_off(me);
check_colors(me);