Mesh drawing stuff!
- in zbuffer mode, vertices will be blended 50% in... and when you increase vertex size larger than 2 pixels, it will draw them smaller - removed all 'wire extra' calls (there were dozens!) and replaced it with simple call where it belongs. This drawing mode is becoming nice & stable... maybe something to make default on for new objects? Makes selecting quite easier... - Subsurf: in editmode, with new 'Optimal' option set, the mesh itself will not draw, but instead it draws 'handles' to the vertices. Looks extremely clean! - matched drawing of default grid-floor (persp) to ortho grid - killed drawing vertices outside of main drawing loop, apart from the routine that uses mouse-selecting. (tekenvertices_ext()). It was an old optimize routine which became quite useless.
This commit is contained in:
@@ -171,6 +171,7 @@ struct _HyperVert {
|
|||||||
|
|
||||||
float co[3];
|
float co[3];
|
||||||
int flag; // added for drawing optim
|
int flag; // added for drawing optim
|
||||||
|
float *orig; // if set, pointer to original vertex, for handles
|
||||||
HyperVert *nmv;
|
HyperVert *nmv;
|
||||||
LinkNode *edges, *faces;
|
LinkNode *edges, *faces;
|
||||||
};
|
};
|
||||||
@@ -247,7 +248,7 @@ static HyperVert *hyperedge_other_vert(HyperEdge *e, HyperVert *a) {
|
|||||||
return (a==e->v[0])?e->v[1]:e->v[0];
|
return (a==e->v[0])?e->v[1]:e->v[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
static HyperVert *hypermesh_add_vert(HyperMesh *hme, float *co) {
|
static HyperVert *hypermesh_add_vert(HyperMesh *hme, float *co, float *orig) {
|
||||||
HyperVert *hv= BLI_memarena_alloc(hme->arena, sizeof(*hv));
|
HyperVert *hv= BLI_memarena_alloc(hme->arena, sizeof(*hv));
|
||||||
|
|
||||||
hv->nmv= NULL;
|
hv->nmv= NULL;
|
||||||
@@ -255,6 +256,7 @@ static HyperVert *hypermesh_add_vert(HyperMesh *hme, float *co) {
|
|||||||
hv->faces= NULL;
|
hv->faces= NULL;
|
||||||
|
|
||||||
Vec3Cpy(hv->co, co);
|
Vec3Cpy(hv->co, co);
|
||||||
|
hv->orig= orig;
|
||||||
|
|
||||||
hv->next= hme->verts;
|
hv->next= hme->verts;
|
||||||
hme->verts= hv;
|
hme->verts= hv;
|
||||||
@@ -345,9 +347,9 @@ static HyperMesh *hypermesh_from_mesh(Mesh *me, DispList *dlverts) {
|
|||||||
|
|
||||||
for (i= 0; i<me->totvert; i++) {
|
for (i= 0; i<me->totvert; i++) {
|
||||||
if (dlverts)
|
if (dlverts)
|
||||||
vert_tbl[i]= hypermesh_add_vert(hme, &dlverts->verts[i*3]);
|
vert_tbl[i]= hypermesh_add_vert(hme, &dlverts->verts[i*3], NULL);
|
||||||
else
|
else
|
||||||
vert_tbl[i]= hypermesh_add_vert(hme, me->mvert[i].co);
|
vert_tbl[i]= hypermesh_add_vert(hme, me->mvert[i].co, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i<me->totface; i++) {
|
for (i=0; i<me->totface; i++) {
|
||||||
@@ -405,7 +407,7 @@ static HyperMesh *hypermesh_from_editmesh(EditVert *everts, EditEdge *eedges, Ed
|
|||||||
* then restore real prev links later.
|
* then restore real prev links later.
|
||||||
*/
|
*/
|
||||||
for (ev= everts; ev; ev= ev->next)
|
for (ev= everts; ev; ev= ev->next)
|
||||||
ev->prev= (EditVert*) hypermesh_add_vert(hme, ev->co);
|
ev->prev= (EditVert*) hypermesh_add_vert(hme, ev->co, ev->co);
|
||||||
|
|
||||||
for (ee= eedges; ee; ee= ee->next)
|
for (ee= eedges; ee; ee= ee->next)
|
||||||
hypermesh_add_edge(hme, (HyperVert*) ee->v1->prev, (HyperVert*) ee->v2->prev, 1);
|
hypermesh_add_edge(hme, (HyperVert*) ee->v1->prev, (HyperVert*) ee->v2->prev, 1);
|
||||||
@@ -453,7 +455,7 @@ static void hypermesh_subdivide(HyperMesh *me, HyperMesh *nme) {
|
|||||||
Vec3Add(co, f->verts[j]->co);
|
Vec3Add(co, f->verts[j]->co);
|
||||||
Vec3MulN(co, (float)(1.0/f->nverts));
|
Vec3MulN(co, (float)(1.0/f->nverts));
|
||||||
|
|
||||||
f->mid= hypermesh_add_vert(nme, co);
|
f->mid= hypermesh_add_vert(nme, co, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (e= me->edges; e; e= e->next) {
|
for (e= me->edges; e; e= e->next) {
|
||||||
@@ -468,7 +470,7 @@ static void hypermesh_subdivide(HyperMesh *me, HyperMesh *nme) {
|
|||||||
Vec3MulN(co, (float)(1.0/count));
|
Vec3MulN(co, (float)(1.0/count));
|
||||||
}
|
}
|
||||||
|
|
||||||
e->ep= hypermesh_add_vert(nme, co);
|
e->ep= hypermesh_add_vert(nme, co, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (v= me->verts; v; v= v->next) {
|
for (v= me->verts; v; v= v->next) {
|
||||||
@@ -515,7 +517,7 @@ static void hypermesh_subdivide(HyperMesh *me, HyperMesh *nme) {
|
|||||||
Vec3MulN(s, (float)(1.0/count));
|
Vec3MulN(s, (float)(1.0/count));
|
||||||
}
|
}
|
||||||
|
|
||||||
v->nmv= hypermesh_add_vert(nme, s);
|
v->nmv= hypermesh_add_vert(nme, s, v->orig);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (e= me->edges; e; e= e->next) {
|
for (e= me->edges; e; e= e->next) {
|
||||||
@@ -645,6 +647,16 @@ static int hypermesh_get_nverts(HyperMesh *hme) {
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int hypermesh_get_nverts_handles(HyperMesh *hme) {
|
||||||
|
HyperVert *v;
|
||||||
|
int count= 0;
|
||||||
|
|
||||||
|
for (v= hme->verts; v; v= v->next)
|
||||||
|
if(v->orig) count++;
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
static int hypermesh_get_nfaces(HyperMesh *hme) {
|
static int hypermesh_get_nfaces(HyperMesh *hme) {
|
||||||
HyperFace *f;
|
HyperFace *f;
|
||||||
int count= 0;
|
int count= 0;
|
||||||
@@ -696,7 +708,7 @@ static DispList *hypermesh_to_displist(HyperMesh *hme) {
|
|||||||
TFace *tfaces;
|
TFace *tfaces;
|
||||||
MFace *mfaces;
|
MFace *mfaces;
|
||||||
MFaceInt *mf;
|
MFaceInt *mf;
|
||||||
int i, j;
|
int i, j, handles=0;
|
||||||
|
|
||||||
/* hme->orig_me==NULL if we are working on an editmesh */
|
/* hme->orig_me==NULL if we are working on an editmesh */
|
||||||
if (hme->orig_me) {
|
if (hme->orig_me) {
|
||||||
@@ -707,11 +719,16 @@ static DispList *hypermesh_to_displist(HyperMesh *hme) {
|
|||||||
mfaces= NULL;
|
mfaces= NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* added: handles for editmode */
|
||||||
|
if (hme->orig_me==NULL) {
|
||||||
|
handles= hypermesh_get_nverts_handles(hme);
|
||||||
|
}
|
||||||
|
|
||||||
dl->type= DL_MESH;
|
dl->type= DL_MESH;
|
||||||
dl->mesh= dlm;
|
dl->mesh= dlm;
|
||||||
|
|
||||||
dlm->totvert= nverts;
|
dlm->totvert= nverts+handles;
|
||||||
dlm->totface= nfaces;
|
dlm->totface= nfaces+handles;
|
||||||
dlm->mvert= MEM_mallocN(dlm->totvert*sizeof(*dlm->mvert), "dlm->mvert");
|
dlm->mvert= MEM_mallocN(dlm->totvert*sizeof(*dlm->mvert), "dlm->mvert");
|
||||||
dlm->mface= MEM_mallocN(dlm->totface*sizeof(*dlm->mface), "dlm->mface");
|
dlm->mface= MEM_mallocN(dlm->totface*sizeof(*dlm->mface), "dlm->mface");
|
||||||
if(hme->orig_me) dlm->flag= hme->orig_me->flag;
|
if(hme->orig_me) dlm->flag= hme->orig_me->flag;
|
||||||
@@ -724,7 +741,6 @@ static DispList *hypermesh_to_displist(HyperMesh *hme) {
|
|||||||
for (i=0, v= hme->verts; i<nverts; i++, v= v->next) {
|
for (i=0, v= hme->verts; i<nverts; i++, v= v->next) {
|
||||||
MVert *mv= &dlm->mvert[i];
|
MVert *mv= &dlm->mvert[i];
|
||||||
Vec3Cpy(mv->co, v->co);
|
Vec3Cpy(mv->co, v->co);
|
||||||
mv->flag= v->flag; // draw flag
|
|
||||||
v->nmv= (void*) i;
|
v->nmv= (void*) i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -838,6 +854,32 @@ static DispList *hypermesh_to_displist(HyperMesh *hme) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* and we add the handles */
|
||||||
|
if(handles) {
|
||||||
|
MVert *mv= dlm->mvert+nverts;
|
||||||
|
mf= dlm->mface+nfaces;
|
||||||
|
i= nverts;
|
||||||
|
for (v= hme->verts; v; v= v->next) {
|
||||||
|
if(v->orig) {
|
||||||
|
/* new vertex */
|
||||||
|
Vec3Cpy(mv->co, v->orig);
|
||||||
|
|
||||||
|
/* new face */
|
||||||
|
mf->v1= (int) v->nmv;
|
||||||
|
mf->v2= i;
|
||||||
|
mf->v3= 0;
|
||||||
|
mf->v4= 0;
|
||||||
|
|
||||||
|
mf->mat_nr= 0;
|
||||||
|
mf->flag= 0;
|
||||||
|
mf->puno= 0;
|
||||||
|
mf->edcode= ME_V1V2;
|
||||||
|
|
||||||
|
mf++; i++; mv++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
add_mvert_normals_from_mfaces(dlm->mvert, dlm->totvert, dlm->mface, dlm->totface);
|
add_mvert_normals_from_mfaces(dlm->mvert, dlm->totvert, dlm->mface, dlm->totface);
|
||||||
|
|
||||||
return dl;
|
return dl;
|
||||||
@@ -866,13 +908,19 @@ static DispList *subsurf_subdivide_to_displist(HyperMesh *hme, short subdiv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void subsurf_make_editmesh(Object *ob) {
|
void subsurf_make_editmesh(Object *ob) {
|
||||||
|
DispList *dl;
|
||||||
|
|
||||||
if (G.eded.first) {
|
if (G.eded.first) {
|
||||||
Mesh *me= ob->data;
|
Mesh *me= ob->data;
|
||||||
HyperMesh *hme= hypermesh_from_editmesh(G.edve.first, G.eded.first, G.edvl.first);
|
HyperMesh *hme= hypermesh_from_editmesh(G.edve.first, G.eded.first, G.edvl.first);
|
||||||
|
|
||||||
free_displist_by_type(&me->disp, DL_MESH);
|
free_displist_by_type(&me->disp, DL_MESH);
|
||||||
BLI_addtail(&me->disp, subsurf_subdivide_to_displist(hme, me->subdiv));
|
BLI_addtail(&me->disp, subsurf_subdivide_to_displist(hme, me->subdiv));
|
||||||
|
|
||||||
|
dl= me->disp.first;
|
||||||
|
if(dl && dl->mesh) dl->mesh->flag= me->flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void subsurf_make_mesh(Object *ob, short subdiv) {
|
void subsurf_make_mesh(Object *ob, short subdiv) {
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ void calc_meshverts_ext(void);
|
|||||||
void calc_meshverts_ext_f2(void);
|
void calc_meshverts_ext_f2(void);
|
||||||
void calc_nurbverts_ext(void);
|
void calc_nurbverts_ext(void);
|
||||||
void tekenvertices(short sel);
|
void tekenvertices(short sel);
|
||||||
void tekenvertices_ext(int mode);
|
|
||||||
void drawcircball(float *cent, float rad, float tmat[][4]);
|
void drawcircball(float *cent, float rad, float tmat[][4]);
|
||||||
void get_local_bounds(struct Object *ob, float *centre, float *size);
|
void get_local_bounds(struct Object *ob, float *centre, float *size);
|
||||||
void draw_object(struct Base *base);
|
void draw_object(struct Base *base);
|
||||||
|
|||||||
@@ -935,7 +935,7 @@ void do_common_editbuts(unsigned short event) // old name, is a mix of object an
|
|||||||
}
|
}
|
||||||
evl= evl->next;
|
evl= evl->next;
|
||||||
}
|
}
|
||||||
tekenvertices_ext( event==B_MATSEL );
|
allqueue(REDRAWVIEW3D, 0);
|
||||||
}
|
}
|
||||||
else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) {
|
else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) {
|
||||||
nu= editNurb.first;
|
nu= editNurb.first;
|
||||||
|
|||||||
@@ -100,9 +100,7 @@
|
|||||||
#include "mydevice.h"
|
#include "mydevice.h"
|
||||||
#include "nla.h"
|
#include "nla.h"
|
||||||
|
|
||||||
#ifdef __NLA
|
|
||||||
#include "BKE_deform.h"
|
#include "BKE_deform.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
/* pretty stupid */
|
/* pretty stupid */
|
||||||
/* extern Lattice *editLatt; already in BKE_lattice.h */
|
/* extern Lattice *editLatt; already in BKE_lattice.h */
|
||||||
@@ -1071,66 +1069,45 @@ void tekenvertices(short sel)
|
|||||||
{
|
{
|
||||||
EditVert *eve;
|
EditVert *eve;
|
||||||
float size;
|
float size;
|
||||||
|
char col[3];
|
||||||
|
|
||||||
|
/* draws in zbuffer mode twice, to show invisible vertices transparent */
|
||||||
|
|
||||||
size= BIF_GetThemeValuef(TH_VERTEX_SIZE);
|
size= BIF_GetThemeValuef(TH_VERTEX_SIZE);
|
||||||
glPointSize(size);
|
if(sel) BIF_GetThemeColor3ubv(TH_VERTEX_SELECT, col);
|
||||||
|
else BIF_GetThemeColor3ubv(TH_VERTEX, col);
|
||||||
|
|
||||||
if(sel) BIF_ThemeColor(TH_VERTEX_SELECT);
|
if(G.zbuf) {
|
||||||
else BIF_ThemeColor(TH_VERTEX);
|
glPointSize(size>2.1?size/2.0: size);
|
||||||
|
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
glColor4ub(col[0], col[1], col[2], 100);
|
||||||
|
|
||||||
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
|
||||||
glBegin(GL_POINTS);
|
glBegin(GL_POINTS);
|
||||||
|
for(eve= G.edve.first; eve; eve= eve->next) {
|
||||||
eve= (EditVert *)G.edve.first;
|
if(eve->h==0 && (eve->f & 1)==sel ) glVertex3fv(eve->co);
|
||||||
while(eve) {
|
|
||||||
if(eve->h==0 && (eve->f & 1)==sel ) {
|
|
||||||
glVertex3fv(eve->co);
|
|
||||||
}
|
}
|
||||||
eve= eve->next;
|
glEnd();
|
||||||
|
|
||||||
|
glDisable(GL_BLEND);
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
glPointSize(size);
|
||||||
|
glColor3ub(col[0], col[1], col[2]);
|
||||||
|
|
||||||
|
glBegin(GL_POINTS);
|
||||||
|
for(eve= G.edve.first; eve; eve= eve->next) {
|
||||||
|
if(eve->h==0 && (eve->f & 1)==sel ) glVertex3fv(eve->co);
|
||||||
}
|
}
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
glPointSize(1.0);
|
glPointSize(1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tekenvertices_ext(int mode)
|
|
||||||
{
|
|
||||||
ScrArea *tempsa, *sa;
|
|
||||||
View3D *vd;
|
|
||||||
|
|
||||||
if(G.f & (G_FACESELECT+G_DRAWFACES)) {
|
|
||||||
allqueue(REDRAWVIEW3D, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(G.zbuf) glDisable(GL_DEPTH_TEST);
|
|
||||||
|
|
||||||
glDrawBuffer(GL_FRONT);
|
|
||||||
|
|
||||||
/* check all views */
|
|
||||||
tempsa= curarea;
|
|
||||||
sa= G.curscreen->areabase.first;
|
|
||||||
while(sa) {
|
|
||||||
if(sa->spacetype==SPACE_VIEW3D) {
|
|
||||||
vd= sa->spacedata.first;
|
|
||||||
if(G.obedit->lay & vd->lay) {
|
|
||||||
areawinset(sa->win);
|
|
||||||
mymultmatrix(G.obedit->obmat);
|
|
||||||
|
|
||||||
calc_meshverts();
|
|
||||||
if(mode==0 || mode==2) tekenvertices(0);
|
|
||||||
if(mode==1 || mode==2) tekenvertices(1);
|
|
||||||
sa->win_swap= WIN_FRONT_OK;
|
|
||||||
|
|
||||||
myloadmatrix(G.vd->viewmat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sa= sa->next;
|
|
||||||
}
|
|
||||||
if(curarea!=tempsa) areawinset(tempsa->win);
|
|
||||||
|
|
||||||
glDrawBuffer(GL_BACK);
|
|
||||||
if(G.zbuf) glEnable(GL_DEPTH_TEST);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ************** DRAW DISPLIST ****************** */
|
/* ************** DRAW DISPLIST ****************** */
|
||||||
|
|
||||||
@@ -1730,70 +1707,6 @@ static void drawDispListshaded(ListBase *lb, Object *ob)
|
|||||||
glShadeModel(GL_FLAT);
|
glShadeModel(GL_FLAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wrappers for shaded+wire and solid+wire */
|
|
||||||
static void drawMeshWireExtra(Object *ob) {
|
|
||||||
GLint origcolor[4];
|
|
||||||
float winmat[16], ofs;
|
|
||||||
|
|
||||||
glGetIntegerv(GL_CURRENT_COLOR, origcolor);
|
|
||||||
|
|
||||||
if(ob->flag & SELECT) {
|
|
||||||
if(ob==OBACT) BIF_ThemeColor(TH_ACTIVE);
|
|
||||||
else BIF_ThemeColor(TH_SELECT);
|
|
||||||
}
|
|
||||||
else BIF_ThemeColor(TH_WIRE);
|
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glGetFloatv(GL_PROJECTION_MATRIX, (float *)winmat);
|
|
||||||
|
|
||||||
if(winmat[15]>0.5) ofs= 0.00005*G.vd->dist; // ortho tweaking
|
|
||||||
else ofs= 0.001;
|
|
||||||
winmat[14]-= ofs;
|
|
||||||
glLoadMatrixf(winmat);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
|
|
||||||
drawmeshwire(ob);
|
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
winmat[14]+= ofs;
|
|
||||||
glLoadMatrixf(winmat);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
|
|
||||||
glColor4iv(origcolor);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void drawDispListWireExtra(Object *ob, ListBase *lb) {
|
|
||||||
GLint origcolor[4];
|
|
||||||
float winmat[16], ofs;
|
|
||||||
|
|
||||||
glGetIntegerv(GL_CURRENT_COLOR, origcolor);
|
|
||||||
|
|
||||||
if(ob->flag & SELECT) {
|
|
||||||
if(ob==OBACT) BIF_ThemeColor(TH_ACTIVE);
|
|
||||||
else BIF_ThemeColor(TH_SELECT);
|
|
||||||
}
|
|
||||||
else BIF_ThemeColor(TH_WIRE);
|
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glGetFloatv(GL_PROJECTION_MATRIX, (float *)winmat);
|
|
||||||
|
|
||||||
if(winmat[15]>0.5) ofs= 0.00005*G.vd->dist; // ortho tweaking
|
|
||||||
else ofs= 0.001;
|
|
||||||
winmat[14]-= ofs;
|
|
||||||
glLoadMatrixf(winmat);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
|
|
||||||
drawDispListwire(lb);
|
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
winmat[14]+= ofs;
|
|
||||||
glLoadMatrixf(winmat);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
|
|
||||||
//glDisable(GL_POLYGON_OFFSET_LINE);
|
|
||||||
|
|
||||||
glColor4iv(origcolor);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void drawmeshsolid(Object *ob, float *nors)
|
static void drawmeshsolid(Object *ob, float *nors)
|
||||||
{
|
{
|
||||||
@@ -1870,14 +1783,9 @@ static void drawmeshsolid(Object *ob, float *nors)
|
|||||||
if(ob==G.obedit) {
|
if(ob==G.obedit) {
|
||||||
calc_meshverts();
|
calc_meshverts();
|
||||||
|
|
||||||
if(G.zbuf) glDisable(GL_DEPTH_TEST);
|
|
||||||
tekenvertices(0);
|
tekenvertices(0);
|
||||||
tekenvertices(1);
|
tekenvertices(1);
|
||||||
if(G.zbuf) glEnable(GL_DEPTH_TEST);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawMeshWireExtra(ob);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else { /* [nors] should never be zero, but is weak code... the displist
|
else { /* [nors] should never be zero, but is weak code... the displist
|
||||||
system needs a make over (ton)
|
system needs a make over (ton)
|
||||||
@@ -2141,8 +2049,6 @@ static void drawmeshshaded(Object *ob, unsigned int *col1, unsigned int *col2)
|
|||||||
glEnd();
|
glEnd();
|
||||||
glShadeModel(GL_FLAT);
|
glShadeModel(GL_FLAT);
|
||||||
if(twoside) glDisable(GL_CULL_FACE);
|
if(twoside) glDisable(GL_CULL_FACE);
|
||||||
|
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawMeshWireExtra(ob);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drawDispList(Object *ob, int dt)
|
static void drawDispList(Object *ob, int dt)
|
||||||
@@ -2180,22 +2086,18 @@ static void drawDispList(Object *ob, int dt)
|
|||||||
/* vertexpaint only true when selecting */
|
/* vertexpaint only true when selecting */
|
||||||
if (vertexpaint) {
|
if (vertexpaint) {
|
||||||
drawmeshsolid(ob, NULL);
|
drawmeshsolid(ob, NULL);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawMeshWireExtra(ob);
|
|
||||||
} else {
|
} else {
|
||||||
init_gl_materials(ob);
|
init_gl_materials(ob);
|
||||||
two_sided(me->flag & ME_TWOSIDED);
|
two_sided(me->flag & ME_TWOSIDED);
|
||||||
drawDispListsolid(lb, ob);
|
drawDispListsolid(lb, ob);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, lb);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
drawmeshsolid(ob, dl->nors);
|
drawmeshsolid(ob, dl->nors);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawMeshWireExtra(ob);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(dt==OB_SHADED) {
|
else if(dt==OB_SHADED) {
|
||||||
#ifdef __NLA
|
|
||||||
if( G.f & G_WEIGHTPAINT && me->dvert) {
|
if( G.f & G_WEIGHTPAINT && me->dvert) {
|
||||||
unsigned char *wtcol, *curwt;
|
unsigned char *wtcol, *curwt;
|
||||||
MFace *curface;
|
MFace *curface;
|
||||||
@@ -2226,26 +2128,20 @@ static void drawDispList(Object *ob, int dt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
drawmeshshaded(ob, (unsigned int*)wtcol, 0);
|
drawmeshshaded(ob, (unsigned int*)wtcol, 0);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawMeshWireExtra(ob);
|
|
||||||
|
|
||||||
MEM_freeN (wtcol);
|
MEM_freeN (wtcol);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
if( G.f & (G_VERTEXPAINT+G_TEXTUREPAINT)) {
|
if( G.f & (G_VERTEXPAINT+G_TEXTUREPAINT)) {
|
||||||
/* in order: vertexpaint already made mcol */
|
/* in order: vertexpaint already made mcol */
|
||||||
///*
|
|
||||||
|
|
||||||
//*/
|
|
||||||
if(me->mcol) {
|
if(me->mcol) {
|
||||||
drawmeshshaded(ob, (unsigned int *)me->mcol, 0);
|
drawmeshshaded(ob, (unsigned int *)me->mcol, 0);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawMeshWireExtra(ob);
|
|
||||||
} else if(me->tface) {
|
} else if(me->tface) {
|
||||||
tface_to_mcol(me);
|
tface_to_mcol(me);
|
||||||
drawmeshshaded(ob, (unsigned int *)me->mcol, 0);
|
drawmeshshaded(ob, (unsigned int *)me->mcol, 0);
|
||||||
MEM_freeN(me->mcol); me->mcol= 0;
|
MEM_freeN(me->mcol); me->mcol= 0;
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawMeshWireExtra(ob);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
drawmeshwire(ob);
|
drawmeshwire(ob);
|
||||||
@@ -2261,10 +2157,8 @@ static void drawDispList(Object *ob, int dt)
|
|||||||
if(dl) {
|
if(dl) {
|
||||||
if(mesh_uses_displist(me)) {
|
if(mesh_uses_displist(me)) {
|
||||||
drawDispListshaded(&me->disp, ob);
|
drawDispListshaded(&me->disp, ob);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, &me->disp);
|
|
||||||
} else {
|
} else {
|
||||||
drawmeshshaded(ob, dl->col1, dl->col2);
|
drawmeshshaded(ob, dl->col1, dl->col2);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawMeshWireExtra(ob);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2298,14 +2192,11 @@ static void drawDispList(Object *ob, int dt)
|
|||||||
if(dt==OB_SHADED) {
|
if(dt==OB_SHADED) {
|
||||||
if(ob->disp.first==0) shadeDispList(ob);
|
if(ob->disp.first==0) shadeDispList(ob);
|
||||||
drawDispListshaded(lb, ob);
|
drawDispListshaded(lb, ob);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, lb);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
init_gl_materials(ob);
|
init_gl_materials(ob);
|
||||||
two_sided(0);
|
two_sided(0);
|
||||||
drawDispListsolid(lb, ob);
|
drawDispListsolid(lb, ob);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, lb);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
index3_nors_incr= 1;
|
index3_nors_incr= 1;
|
||||||
}
|
}
|
||||||
@@ -2329,14 +2220,12 @@ static void drawDispList(Object *ob, int dt)
|
|||||||
if(dt==OB_SHADED) {
|
if(dt==OB_SHADED) {
|
||||||
if(ob->disp.first==0) shadeDispList(ob);
|
if(ob->disp.first==0) shadeDispList(ob);
|
||||||
drawDispListshaded(lb, ob);
|
drawDispListshaded(lb, ob);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, lb);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
init_gl_materials(ob);
|
init_gl_materials(ob);
|
||||||
two_sided(0);
|
two_sided(0);
|
||||||
|
|
||||||
drawDispListsolid(lb, ob);
|
drawDispListsolid(lb, ob);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, lb);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -2354,14 +2243,12 @@ static void drawDispList(Object *ob, int dt)
|
|||||||
dl= lb->first;
|
dl= lb->first;
|
||||||
if(dl && dl->col1==0) shadeDispList(ob);
|
if(dl && dl->col1==0) shadeDispList(ob);
|
||||||
drawDispListshaded(lb, ob);
|
drawDispListshaded(lb, ob);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, lb);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
init_gl_materials(ob);
|
init_gl_materials(ob);
|
||||||
two_sided(0);
|
two_sided(0);
|
||||||
|
|
||||||
drawDispListsolid(lb, ob);
|
drawDispListsolid(lb, ob);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, lb);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else drawDispListwire(lb);
|
else drawDispListwire(lb);
|
||||||
@@ -2484,13 +2371,15 @@ static void drawmeshwire(Object *ob)
|
|||||||
EditEdge *eed;
|
EditEdge *eed;
|
||||||
EditVlak *evl;
|
EditVlak *evl;
|
||||||
float fvec[3], cent[3], *f1, *f2, *f3, *f4, *extverts=0;
|
float fvec[3], cent[3], *f1, *f2, *f3, *f4, *extverts=0;
|
||||||
int a, start, end, test, /* colbcol=0, */ ok;
|
int a, start, end, test, ok, handles=0;
|
||||||
|
|
||||||
me= get_mesh(ob);
|
me= get_mesh(ob);
|
||||||
|
|
||||||
if(ob==G.obedit || (G.obedit && ob->data==G.obedit->data)) {
|
if(ob==G.obedit || (G.obedit && ob->data==G.obedit->data)) {
|
||||||
|
|
||||||
if(G.f & (G_FACESELECT+G_DRAWFACES)) { /* faces */
|
if( (me->flag & ME_OPT_EDGES) && (me->flag & ME_SUBSURF)) handles= 1;
|
||||||
|
|
||||||
|
if(handles==0 && (G.f & (G_FACESELECT+G_DRAWFACES))) { /* faces */
|
||||||
char col1[4], col2[4];
|
char col1[4], col2[4];
|
||||||
|
|
||||||
BIF_GetThemeColor4ubv(TH_FACE, col1);
|
BIF_GetThemeColor4ubv(TH_FACE, col1);
|
||||||
@@ -2544,13 +2433,15 @@ static void drawmeshwire(Object *ob)
|
|||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(G.zbuf==0 && mesh_uses_displist(me)) {
|
if(mesh_uses_displist(me)) {
|
||||||
cpack(0x505050);
|
if(handles) BIF_ThemeColor(TH_WIRE);
|
||||||
|
else BIF_ThemeColorBlend(TH_WIRE, TH_BACK, 0.5);
|
||||||
|
|
||||||
drawDispListwire(&me->disp);
|
drawDispListwire(&me->disp);
|
||||||
}
|
}
|
||||||
cpack(0x0);
|
cpack(0x0);
|
||||||
|
|
||||||
if(G.f & G_DRAWEDGES) { /* Use edge Highlighting */
|
if(handles==0 && (G.f & G_DRAWEDGES)) { /* Use edge Highlighting */
|
||||||
char col[4];
|
char col[4];
|
||||||
BIF_GetThemeColor3ubv(TH_EDGE_SELECT, col);
|
BIF_GetThemeColor3ubv(TH_EDGE_SELECT, col);
|
||||||
glShadeModel(GL_SMOOTH);
|
glShadeModel(GL_SMOOTH);
|
||||||
@@ -2569,7 +2460,7 @@ static void drawmeshwire(Object *ob)
|
|||||||
glEnd();
|
glEnd();
|
||||||
glShadeModel(GL_FLAT);
|
glShadeModel(GL_FLAT);
|
||||||
}
|
}
|
||||||
else {
|
else if(handles==0) {
|
||||||
eed= G.eded.first;
|
eed= G.eded.first;
|
||||||
glBegin(GL_LINES);
|
glBegin(GL_LINES);
|
||||||
while(eed) {
|
while(eed) {
|
||||||
@@ -2585,13 +2476,8 @@ static void drawmeshwire(Object *ob)
|
|||||||
|
|
||||||
calc_meshverts();
|
calc_meshverts();
|
||||||
|
|
||||||
if(G.zbuf) glDisable(GL_DEPTH_TEST);
|
|
||||||
tekenvertices(0);
|
tekenvertices(0);
|
||||||
tekenvertices(1);
|
tekenvertices(1);
|
||||||
#ifdef __NLA
|
|
||||||
tekenvertices(2); /* __TEKENTEST */
|
|
||||||
#endif
|
|
||||||
if(G.zbuf) glEnable(GL_DEPTH_TEST);
|
|
||||||
|
|
||||||
if(G.f & G_DRAWNORMALS) { /* normals */
|
if(G.f & G_DRAWNORMALS) { /* normals */
|
||||||
cpack(0xDDDD22);
|
cpack(0xDDDD22);
|
||||||
@@ -3450,6 +3336,55 @@ static int ob_from_decimator(Object *ob)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void drawWireExtra(Object *ob, ListBase *lb)
|
||||||
|
{
|
||||||
|
float winmat[16], ofs;
|
||||||
|
|
||||||
|
if(ob!=G.obedit && (ob->flag & SELECT)) {
|
||||||
|
if(ob==OBACT) BIF_ThemeColor(TH_ACTIVE);
|
||||||
|
else BIF_ThemeColor(TH_SELECT);
|
||||||
|
}
|
||||||
|
else BIF_ThemeColor(TH_WIRE);
|
||||||
|
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glGetFloatv(GL_PROJECTION_MATRIX, (float *)winmat);
|
||||||
|
|
||||||
|
if(winmat[15]>0.5) ofs= 0.00005*G.vd->dist; // ortho tweaking
|
||||||
|
else ofs= 0.001;
|
||||||
|
winmat[14]-= ofs;
|
||||||
|
glLoadMatrixf(winmat);
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
|
||||||
|
if(ob->type==OB_MESH) drawmeshwire(ob);
|
||||||
|
else drawDispListwire(lb);
|
||||||
|
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
winmat[14]+= ofs;
|
||||||
|
glLoadMatrixf(winmat);
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void draw_extra_wire(Object *ob)
|
||||||
|
{
|
||||||
|
Curve *cu;
|
||||||
|
|
||||||
|
switch(ob->type) {
|
||||||
|
case OB_MESH:
|
||||||
|
drawWireExtra(ob, NULL);
|
||||||
|
break;
|
||||||
|
case OB_CURVE:
|
||||||
|
case OB_SURF:
|
||||||
|
cu= ob->data;
|
||||||
|
if(boundbox_clip(ob->obmat, cu->bb)) drawWireExtra(ob, &cu->disp);
|
||||||
|
break;
|
||||||
|
case OB_MBALL:
|
||||||
|
drawWireExtra(ob, &ob->disp);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void draw_object(Base *base)
|
void draw_object(Base *base)
|
||||||
{
|
{
|
||||||
PartEff *paf;
|
PartEff *paf;
|
||||||
@@ -3654,14 +3589,9 @@ void draw_object(Base *base)
|
|||||||
init_gl_materials(ob);
|
init_gl_materials(ob);
|
||||||
two_sided( me->flag & ME_TWOSIDED );
|
two_sided( me->flag & ME_TWOSIDED );
|
||||||
drawDispListsolid(&me->disp, ob);
|
drawDispListsolid(&me->disp, ob);
|
||||||
/* this seems to be the place where the wire for subsurfs
|
|
||||||
* gets drawn.. so we draw an extra wire in grey here (editmode) */
|
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, &me->disp);
|
|
||||||
drawmeshwire(ob);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
drawmeshsolid(ob, 0);
|
drawmeshsolid(ob, 0);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawDispListWireExtra(ob, &me->disp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ob==G.obedit && (G.f & G_PROPORTIONAL)) draw_prop_circle();
|
if(ob==G.obedit && (G.f & G_PROPORTIONAL)) draw_prop_circle();
|
||||||
@@ -3677,14 +3607,12 @@ void draw_object(Base *base)
|
|||||||
if(G.f & G_BACKBUFSEL) drawmeshsolid(ob, 0);
|
if(G.f & G_BACKBUFSEL) drawmeshsolid(ob, 0);
|
||||||
else if(G.f & G_FACESELECT || G.vd->drawtype==OB_TEXTURE) {
|
else if(G.f & G_FACESELECT || G.vd->drawtype==OB_TEXTURE) {
|
||||||
draw_tface_mesh(ob, ob->data, dt);
|
draw_tface_mesh(ob, ob->data, dt);
|
||||||
if(ob->dtx & OB_DRAWWIRE) drawMeshWireExtra(ob);
|
|
||||||
}
|
}
|
||||||
else drawDispList(ob, dt);
|
else drawDispList(ob, dt);
|
||||||
}
|
}
|
||||||
else drawDispList(ob, dt);
|
else drawDispList(ob, dt);
|
||||||
}
|
}
|
||||||
if( (ob!=G.obedit)
|
if( (ob!=G.obedit) && ((G.f & (G_BACKBUFSEL+G_PICKSEL)) == 0) ) {
|
||||||
&& ((G.f & (G_BACKBUFSEL+G_PICKSEL)) == 0) ) {
|
|
||||||
paf = give_parteff(ob);
|
paf = give_parteff(ob);
|
||||||
if( paf ) {
|
if( paf ) {
|
||||||
if(col) cpack(0xFFFFFF); /* for visibility */
|
if(col) cpack(0xFFFFFF); /* for visibility */
|
||||||
@@ -3737,14 +3665,9 @@ void draw_object(Base *base)
|
|||||||
drawlattice(ob);
|
drawlattice(ob);
|
||||||
if(ob==G.obedit && (G.f & G_PROPORTIONAL)) draw_prop_circle();
|
if(ob==G.obedit && (G.f & G_PROPORTIONAL)) draw_prop_circle();
|
||||||
break;
|
break;
|
||||||
case OB_IKA:
|
|
||||||
draw_ika(ob, base->flag & SELECT);
|
|
||||||
break;
|
|
||||||
#ifdef __NLA
|
|
||||||
case OB_ARMATURE:
|
case OB_ARMATURE:
|
||||||
draw_armature (ob);
|
draw_armature (ob);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
drawaxes(1.0);
|
drawaxes(1.0);
|
||||||
}
|
}
|
||||||
@@ -3767,6 +3690,8 @@ void draw_object(Base *base)
|
|||||||
}
|
}
|
||||||
if(dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);
|
if(dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);
|
||||||
}
|
}
|
||||||
|
// dtx is set at zero in editmode, but we want this one!
|
||||||
|
if(ob->dtx & OB_DRAWWIRE && dt>=OB_SOLID) draw_extra_wire(ob);
|
||||||
|
|
||||||
if(dt<OB_SHADED) {
|
if(dt<OB_SHADED) {
|
||||||
if((ob->gameflag & OB_ACTOR) && (ob->gameflag & OB_DYNAMIC)) {
|
if((ob->gameflag & OB_ACTOR) && (ob->gameflag & OB_DYNAMIC)) {
|
||||||
|
|||||||
@@ -560,7 +560,6 @@ static void drawfloor(void)
|
|||||||
gridlines= vd->gridlines/2;
|
gridlines= vd->gridlines/2;
|
||||||
grid= gridlines*vd->grid;
|
grid= gridlines*vd->grid;
|
||||||
|
|
||||||
BIF_ThemeColor(TH_GRID);
|
|
||||||
BIF_GetThemeColor3ubv(TH_GRID, col);
|
BIF_GetThemeColor3ubv(TH_GRID, col);
|
||||||
|
|
||||||
for(a= -gridlines;a<=gridlines;a++) {
|
for(a= -gridlines;a<=gridlines;a++) {
|
||||||
@@ -568,9 +567,10 @@ static void drawfloor(void)
|
|||||||
if(a==0) {
|
if(a==0) {
|
||||||
glColor3ub(col[0]<36?0:col[0]-36, col[1]>199?255:col[1]+56, col[2]<36?0:col[2]-36); /* y-as */
|
glColor3ub(col[0]<36?0:col[0]-36, col[1]>199?255:col[1]+56, col[2]<36?0:col[2]-36); /* y-as */
|
||||||
}
|
}
|
||||||
else if(a==1) {
|
else if( (a % 10)==0) {
|
||||||
BIF_ThemeColor(TH_GRID);
|
BIF_ThemeColorShade(TH_GRID, -10);
|
||||||
}
|
}
|
||||||
|
else BIF_ThemeColorShade(TH_GRID, 10);
|
||||||
|
|
||||||
|
|
||||||
glBegin(GL_LINE_STRIP);
|
glBegin(GL_LINE_STRIP);
|
||||||
@@ -582,15 +582,14 @@ static void drawfloor(void)
|
|||||||
glEnd();
|
glEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
BIF_ThemeColor(TH_GRID);
|
|
||||||
|
|
||||||
for(a= -gridlines;a<=gridlines;a++) {
|
for(a= -gridlines;a<=gridlines;a++) {
|
||||||
if(a==0) {
|
if(a==0) {
|
||||||
glColor3ub(col[0]>219?255:col[0]+36, col[1]<26?0:col[1]-26, col[2]<26?0:col[2]-26); /* x-as */
|
glColor3ub(col[0]>219?255:col[0]+36, col[1]<26?0:col[1]-26, col[2]<26?0:col[2]-26); /* x-as */
|
||||||
}
|
}
|
||||||
else if(a==1) {
|
else if( (a % 10)==0) {
|
||||||
BIF_ThemeColor(TH_GRID);
|
BIF_ThemeColorShade(TH_GRID, -10);
|
||||||
}
|
}
|
||||||
|
else BIF_ThemeColorShade(TH_GRID, 10);
|
||||||
|
|
||||||
glBegin(GL_LINE_STRIP);
|
glBegin(GL_LINE_STRIP);
|
||||||
vert[1]= a*vd->grid;
|
vert[1]= a*vd->grid;
|
||||||
|
|||||||
@@ -2514,7 +2514,7 @@ static void selectconnectedAll(void)
|
|||||||
}
|
}
|
||||||
countall();
|
countall();
|
||||||
|
|
||||||
tekenvertices_ext(1);
|
allqueue(REDRAWVIEW3D, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2577,7 +2577,7 @@ void selectconnected_mesh(void)
|
|||||||
}
|
}
|
||||||
countall();
|
countall();
|
||||||
|
|
||||||
tekenvertices_ext( sel==3 );
|
allqueue(REDRAWVIEW3D, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -933,15 +933,10 @@ void mesh_selectionCB(int selecting, Object *editobj, short *mval, float rad)
|
|||||||
}
|
}
|
||||||
eve= eve->next;
|
eve= eve->next;
|
||||||
}
|
}
|
||||||
if(G.f & (G_FACESELECT+G_DRAWFACES)) {
|
|
||||||
draw_sel_circle(0, 0, 0, 0, 0); /* signal */
|
draw_sel_circle(0, 0, 0, 0, 0); /* signal */
|
||||||
force_draw();
|
force_draw();
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(selecting!=LEFTMOUSE) tekenvertices_ext(0);
|
|
||||||
/* always draw selected vertices */
|
|
||||||
tekenvertices_ext(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1116,16 +1111,9 @@ void circle_select(void)
|
|||||||
}
|
}
|
||||||
eve= eve->next;
|
eve= eve->next;
|
||||||
}
|
}
|
||||||
if(G.f & (G_FACESELECT+G_DRAWFACES)) {
|
|
||||||
draw_sel_circle(0, 0, 0, 0, 0); /* signal */
|
draw_sel_circle(0, 0, 0, 0, 0); /* signal */
|
||||||
force_draw();
|
force_draw();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if(selecting!=LEFTMOUSE) tekenvertices_ext(0);
|
|
||||||
/* always draw selected vertices */
|
|
||||||
tekenvertices_ext(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) {
|
else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) {
|
||||||
|
|
||||||
calc_nurbverts_ext(); /* drawobject.c */
|
calc_nurbverts_ext(); /* drawobject.c */
|
||||||
|
|||||||
Reference in New Issue
Block a user