forked from bartvdbraak/blender
Fixed bug #5582, Subsurfed Multires'd objects don't display properly with interactive display unset. Added a new function for sculptmode that checks to make sure that not only are there some modifiers active, but that they are actually enabled for realtime editing.
This commit is contained in:
parent
6d5b24fcb8
commit
0762a5a975
@ -127,6 +127,7 @@ struct BrushData *sculptmode_brush();
|
||||
float *get_tex_angle();
|
||||
|
||||
void sculptmode_update_tex();
|
||||
char sculpt_modifiers_active(struct Object *ob);
|
||||
void sculpt();
|
||||
void set_sculpt_object(struct Object *ob);
|
||||
void set_sculptmode();
|
||||
|
@ -2163,7 +2163,7 @@ static int draw_mesh_object(Base *base, int dt, int flag)
|
||||
finalDM->release(finalDM);
|
||||
}
|
||||
else if(!G.obedit && G.scene->sculptdata.draw_mode &&
|
||||
OBACT==ob && !modifiers_getVirtualModifierList(ob)) {
|
||||
OBACT==ob && !sculpt_modifiers_active(ob)) {
|
||||
sculptmode_draw_mesh(0);
|
||||
}
|
||||
else {
|
||||
|
@ -493,8 +493,8 @@ void sculptmode_undo_update(SculptUndoStep *newcur)
|
||||
|
||||
set_sculpt_object(ob);
|
||||
|
||||
if(!sculpt_data()->draw_mode || modifiers_getVirtualModifierList(ob))
|
||||
DAG_object_flush_update(G.scene, OBACT, OB_RECALC_DATA);
|
||||
if(!sculpt_data()->draw_mode || sculpt_modifiers_active(ob))
|
||||
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
|
||||
|
||||
if(G.vd->depths) G.vd->depths->damaged= 1;
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
@ -1796,6 +1796,19 @@ void sculptmode_correct_state()
|
||||
if(!sculpt_session()->undo) sculptmode_undo_init();
|
||||
}
|
||||
|
||||
/* Checks whether full update mode (slower) needs to be used to work with modifiers */
|
||||
char sculpt_modifiers_active(Object *ob)
|
||||
{
|
||||
ModifierData *md;
|
||||
|
||||
for(md= modifiers_getVirtualModifierList(ob); md; md= md->next) {
|
||||
if(md->mode & eModifierMode_Realtime)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sculpt()
|
||||
{
|
||||
SculptData *sd= sculpt_data();
|
||||
@ -1856,7 +1869,7 @@ void sculpt()
|
||||
/* If modifier_calculations is true, then extra time must be spent
|
||||
updating the mesh. This takes a *lot* longer, so it's worth
|
||||
skipping if the modifier stack is empty. */
|
||||
modifier_calculations= modifiers_getVirtualModifierList(ob) != NULL;
|
||||
modifier_calculations= sculpt_modifiers_active(ob);
|
||||
|
||||
init_sculptmatrices();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user