From c0becb45323d76ba0cf6840b264f20428c275e11 Mon Sep 17 00:00:00 2001 From: Ben Batt Date: Wed, 6 Dec 2006 12:34:26 +0000 Subject: [PATCH] Removed SlowerDraw and FasterDraw buttons in Mesh panel after discussion with Ton on IRC. This feature was old, something of a hack and didn't really work well with the modifier stack. To paraphrase Ton: We want to make blender higher quality, so poorly thought out code should be removed, or replaced with decent implementations. --- source/blender/include/BIF_meshtools.h | 3 -- source/blender/include/butspace.h | 3 +- source/blender/src/buttons_editing.c | 11 ----- source/blender/src/meshtools.c | 68 -------------------------- 4 files changed, 1 insertion(+), 84 deletions(-) diff --git a/source/blender/include/BIF_meshtools.h b/source/blender/include/BIF_meshtools.h index 166dd4542b5..f489bbf4120 100644 --- a/source/blender/include/BIF_meshtools.h +++ b/source/blender/include/BIF_meshtools.h @@ -38,9 +38,6 @@ struct EditVert; extern int join_mesh(void); -extern void fasterdraw(void); -extern void slowerdraw(void); - extern void sort_faces(void); extern void objects_bake_render(void); diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h index a3abf3b8acf..1dbd61b980c 100644 --- a/source/blender/include/butspace.h +++ b/source/blender/include/butspace.h @@ -397,8 +397,7 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la #define B_DECIM_FACES 2067 #define B_DECIM_CANCEL 2068 #define B_DECIM_APPLY 2069 -#define B_SLOWERDRAW 2070 -#define B_FASTERDRAW 2071 +/* B_SLOWERDRAW and B_FASTERDRAW removed */ #define B_VERTEXNOISE 2072 #define B_VERTEXSMOOTH 2073 #define B_MAKESTICKY 2074 diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index da86ce2ca9b..2ff8d72640e 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -724,10 +724,6 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me) uiDefIDPoinBut(block, test_meshpoin_but, ID_ME, B_REDR, "TexMesh: ", 175,124,230,19, &me->texcomesh, "Derive texture coordinates from another mesh."); - uiBlockBeginAlign(block); - uiDefBut(block, BUT, B_SLOWERDRAW,"SlowerDraw", 175,30,95,19, 0, 0, 0, 0, 0, "Displays the active object with all possible edges shown"); - uiDefBut(block, BUT, B_FASTERDRAW,"FasterDraw", 175,10,95,19, 0, 0, 0, 0, 0, "Displays the active object faster by omitting some edges when drawing"); - uiBlockBeginAlign(block); uiDefBut(block, BUT,B_DOCENTRE, "Centre", 275, 95, 130, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin"); uiDefBut(block, BUT,B_DOCENTRENEW, "Centre New", 275, 75, 130, 19, 0, 0, 0, 0, 0, "Shifts object's origin to center of object data"); @@ -3631,13 +3627,6 @@ void do_meshbuts(unsigned short event) allqueue(REDRAWVIEW3D, 0); } break; - - case B_SLOWERDRAW: - slowerdraw(); - break; - case B_FASTERDRAW: - fasterdraw(); - break; } } if(G.obedit==NULL || (G.obedit->type!=OB_MESH)) return; diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index 3d874021497..7d07b3f89d5 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -417,74 +417,6 @@ int join_mesh(void) } -void fasterdraw(void) -{ - Base *base; - Mesh *me; - int toggle, a; - - if(G.obedit || G.vd==NULL) return; - - /* reset flags */ - me= G.main->mesh.first; - while(me) { - me->flag &= ~ME_ISDONE; - me= me->id.next; - } - - base= FIRSTBASE; - while(base) { - if( TESTBASELIB(base) && (base->object->type==OB_MESH)) { - me= base->object->data; - if(me->id.lib==0 && (me->flag & ME_ISDONE)==0) { - me->flag |= ME_ISDONE; - toggle= 0; - for(a=0; atotedge; a++) { - MEdge *med = &me->medge[a]; - - if( (med->flag & ME_EDGEDRAW) && !( (toggle++) & 3) ) { - med->flag ^= ME_EDGEDRAW; - } - } - } - } - base= base->next; - } - - /* important?: reset flags again */ - me= G.main->mesh.first; - while(me) { - me->flag &= ~ME_ISDONE; - me= me->id.next; - } - - allqueue(REDRAWVIEW3D, 0); -} - -void slowerdraw(void) /* reset fasterdraw */ -{ - Base *base; - Mesh *me; - int a; - - if(G.obedit || G.vd==NULL) return; - - base= FIRSTBASE; - while(base) { - if( TESTBASELIB(base) && (base->object->type==OB_MESH)) { - me= base->object->data; - if(me->id.lib==0) { - for(a=0; atotedge; a++) { - me->medge[a].flag |= ME_EDGEDRAW; - } - } - } - base= base->next; - } - - allqueue(REDRAWVIEW3D, 0); -} - /* ********************** SORT FACES ******************* */ static void permutate(void *list, int num, int size, int *index)