forked from bartvdbraak/blender
Fix for bug #5345, sculpt tool doesn't seems to use correctly the undo setting on the global preferences
This commit is contained in:
parent
c181c8986f
commit
fc691cdb5e
@ -1063,8 +1063,11 @@ void multires_level_to_mesh(Object *ob, Mesh *me)
|
||||
/* Vertices/Edges/Faces */
|
||||
|
||||
for(i=0; i<lvl->totvert; ++i) {
|
||||
if(em)
|
||||
if(em) {
|
||||
eves[i]= addvertlist(lvl->verts[i].co, NULL); /* TODO */
|
||||
if(lvl->verts[i].flag & 1) eves[i]->f |= SELECT;
|
||||
if(lvl->verts[i].flag & ME_HIDE) eves[i]->h= 1;
|
||||
}
|
||||
else
|
||||
me->mvert[i]= lvl->verts[i];
|
||||
}
|
||||
|
@ -301,10 +301,17 @@ void sculptmode_undo_free(Scene *sce)
|
||||
|
||||
void sculptmode_undo_push(char *str, SculptUndoType type)
|
||||
{
|
||||
int cnt= 7;
|
||||
int cnt= U.undosteps-1;
|
||||
SculptUndo *su= G.scene->sculptdata.undo;
|
||||
SculptUndoStep *n= MEM_callocN(sizeof(SculptUndoStep), "SculptUndo"), *sus, *chop, *path;
|
||||
SculptUndoStep *n, *sus, *chop, *path;
|
||||
Mesh *me= get_mesh(G.scene->sculptdata.active_ob);
|
||||
|
||||
if(U.undosteps==0) {
|
||||
sculptmode_undo_free(G.scene);
|
||||
return;
|
||||
}
|
||||
|
||||
n= MEM_callocN(sizeof(SculptUndoStep), "SculptUndo");
|
||||
|
||||
/* Chop off undo data after cur */
|
||||
for(sus= su->steps.last; sus && sus != su->cur; sus= path) {
|
||||
|
Loading…
Reference in New Issue
Block a user