Changed test for (me->flag&ME_SUBSURF) into

((me->flag&ME_SUBSURF) && me->subdiv)

In build_mesh_data(). This because meshes with subdiv==0 were calling a
MakeDisplist() for each redraw otherwise, disabling for example the
posemode "delay deform" feature. (bug #2700)

Daniel; it would help if you would add comments in the code, for example
to understand the difference between;

mesh_get_base_derived()
mesh_get_derived()

and how it relates to

build_mesh_data()

I realize most of the mess is in displist code... and confusing use
of features while editing, posemode, & render. Nevertheless, it's not
clear at first sight which parts of derivedmesh is design, and which
part reflects the hacks to make it work. :)
This commit is contained in:
Ton Roosendaal 2005-06-06 09:52:44 +00:00
parent 35a00d7ca0
commit 88fa58c437
2 changed files with 4 additions and 3 deletions

@ -40,6 +40,7 @@
#include "DNA_mesh_types.h" #include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h" #include "DNA_meshdata_types.h"
#include "DNA_object_types.h" #include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "BLI_blenlib.h" #include "BLI_blenlib.h"
#include "BLI_editVert.h" #include "BLI_editVert.h"
@ -846,13 +847,13 @@ static void build_mesh_data(Object *ob, int inEditMode)
if(ob->parent && ob->partype==PARSKEL) makeDispList(ob); if(ob->parent && ob->partype==PARSKEL) makeDispList(ob);
else if(ob->parent && ob->parent->type==OB_LATTICE) makeDispList(ob); else if(ob->parent && ob->parent->type==OB_LATTICE) makeDispList(ob);
else if(ob->hooks.first) makeDispList(ob); else if(ob->hooks.first) makeDispList(ob);
else if(ob->softflag & 0x01) makeDispList(ob); else if(ob->softflag & OB_SB_ENABLE) makeDispList(ob);
else if(ob->effect.first) { else if(ob->effect.first) {
Effect *eff= ob->effect.first; Effect *eff= ob->effect.first;
if(eff->type==EFF_WAVE) makeDispList(ob); if(eff->type==EFF_WAVE) makeDispList(ob);
} }
} }
if(me->flag&ME_SUBSURF) { if ((me->flag&ME_SUBSURF) && me->subdiv) {
if(inEditMode && !G.editMesh->derived) { if(inEditMode && !G.editMesh->derived) {
makeDispList(ob); makeDispList(ob);
} else if (!inEditMode && !me->derived) { } else if (!inEditMode && !me->derived) {

@ -2268,7 +2268,7 @@ void test_all_displists(void)
} }
} }
if(ob->softflag & 0x01) freedisplist_object(ob); if(ob->softflag & OB_SB_ENABLE) freedisplist_object(ob);
/* warn, ob pointer changed in case of OB_MALL */ /* warn, ob pointer changed in case of OB_MALL */
if ELEM(ob->type, OB_CURVE, OB_SURF) { if ELEM(ob->type, OB_CURVE, OB_SURF) {