diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-08-03 23:56:27 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-08-03 23:56:27 +0400 |
commit | 74820841df892ff58508d4d338f3051089515e3b (patch) | |
tree | 4d0d1dc09e9a50c3668d9bd70261df941c201d5b /source/blender | |
parent | 1db88bd065f9638f235c2a1047b50255de7e05ac (diff) |
- removed BLO_findstruct_offset (obsolete)
- remove python access to Optimal and Subsurf flags (they don't
work this way anymore, I suppose need to replace with python
access to modifiers but not going to do right now).
- removed interface access to OPTIMAL mode, needs to be rethough...
this means at the moment subsurfs outside editmode always draw
and render all edges
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/BLO_genfile.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/genfile.c | 41 | ||||
-rw-r--r-- | source/blender/python/api2_2x/NMesh.c | 8 | ||||
-rw-r--r-- | source/blender/renderconverter/intern/convertBlenderScene.c | 47 | ||||
-rw-r--r-- | source/blender/src/buttons_editing.c | 3 | ||||
-rw-r--r-- | source/blender/src/drawobject.c | 7 | ||||
-rw-r--r-- | source/blender/src/edit.c | 1 | ||||
-rw-r--r-- | source/blender/src/toolbox.c | 2 |
11 files changed, 25 insertions, 92 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 6f1289a49c2..33108dcd235 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -479,7 +479,7 @@ static DerivedMesh *getMeshDerivedMesh(Mesh *me, Object *ob, float (*vertCos)[3] // XXX this is kinda hacky because we shouldn't really be editing // the mesh here, however, we can't just call mesh_build_faceNormals(ob) // because in the case when a key is applied to a mesh the vertex normals - // would never be correctly computed (and renderer makes this assumption. + // would never be correctly computed (and renderer makes this assumption). mesh_calc_normals(mdm->verts, me->totvert, me->mface, me->totface, &mdm->nors); mdm->freeNors = 1; } @@ -868,7 +868,6 @@ static void emDM_release(DerivedMesh *dm) MEM_freeN(emdm); } - // XXX face and vertex normals are wrong with vertexcos static DerivedMesh *getEditMeshDerivedMesh(EditMesh *em, float (*vertexCos)[3]) { EditMeshDerivedMesh *emdm = MEM_callocN(sizeof(*emdm), "emdm"); diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index bebd7bf4d93..45d20bddaa3 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -772,7 +772,6 @@ void mesh_create_shadedColors(Object *ob, int onlyForMesh, unsigned int **col1_r vidx[2]= mf->v3; vidx[3]= mf->v4; - // XXX, should all DLM's have normals? if (dlm->nors) { VECCOPY(nor, &dlm->nors[i*3]); } else { diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 1eb80220fac..b5453ed6001 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -767,7 +767,7 @@ static void *decimateModifier_applyModifier(ModifierData *md, Object *ob, void * float *vbCo = &lod.vertex_buffer[a*3]; float *vbNo = &lod.vertex_normal_buffer[a*3]; - if (vertexCos) { // XXX normals wrong + if (vertexCos) { VECCOPY(vbCo, vertexCos[a]); } else { VECCOPY(vbCo, mv->co); diff --git a/source/blender/blenloader/BLO_genfile.h b/source/blender/blenloader/BLO_genfile.h index fadd81a59cc..6549bafe89b 100644 --- a/source/blender/blenloader/BLO_genfile.h +++ b/source/blender/blenloader/BLO_genfile.h @@ -34,7 +34,5 @@ #ifndef BLO_GENFILE_H #define BLO_GENFILE_H -int BLO_findstruct_offset(char *structname, char *member);// used by py_main.c - #endif diff --git a/source/blender/blenloader/intern/genfile.c b/source/blender/blenloader/intern/genfile.c index 7ace38e3490..39a7f3e4e62 100644 --- a/source/blender/blenloader/intern/genfile.c +++ b/source/blender/blenloader/intern/genfile.c @@ -483,47 +483,6 @@ struct SDNA *dna_sdna_from_data(void *data, int datalen, int do_endian_swap) return sdna; } - /* XXX, this routine was added because at one - * point I thought using the dna more would be - * nice, but really thats a flawed idea, you - * already know about your memory structures when - * you are compiling no need to redirect that - * through the DNA, the python stuff should be - * changed to not use this routine (a bit - * o' work). - zr - */ -int BLO_findstruct_offset(char *structname, char *member) -{ - extern char DNAstr[]; /* DNA.c */ - extern int DNAlen; - - struct SDNA *sdna; - int a, offset; - short *sp; - - sdna= dna_sdna_from_data(DNAstr, DNAlen, 0); - - sp= findstruct_name(sdna, structname); - - if(sp) { - a= sp[1]; /* nr of elems */ - sp+= 2; - offset= 0; - - while(a--) { - if(strcmp(sdna->names[sp[1]], member)==0) { - dna_freestructDNA(sdna); - return offset; - } - - offset+= elementsize(sdna, sp[0], sp[1]); - sp+= 2; - } - } - - dna_freestructDNA(sdna); - return -1; -} /* ******************** END READ DNA ********************** */ diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c index 44c0b501159..d4feea4a166 100644 --- a/source/blender/python/api2_2x/NMesh.c +++ b/source/blender/python/api2_2x/NMesh.c @@ -1548,10 +1548,6 @@ static PyObject *NMesh_setMode( PyObject * self, PyObject * args ) mode |= ME_TWOSIDED; else if( strcmp( m[i], "AutoSmooth" ) == 0 ) mode |= ME_AUTOSMOOTH; - else if( strcmp( m[i], "SubSurf" ) == 0 ) - mode |= ME_SUBSURF; - else if( strcmp( m[i], "Optimal" ) == 0 ) - mode |= ME_OPT_EDGES; else if( m[i][0] == '\0' ) mode = 0; else @@ -3243,10 +3239,6 @@ static PyObject *M_NMesh_Modes( void ) constant_insert( d, "AUTOSMOOTH", PyInt_FromLong ( ME_AUTOSMOOTH ) ); - constant_insert( d, "SUBSURF", - PyInt_FromLong( ME_SUBSURF ) ); - constant_insert( d, "OPTIMAL", - PyInt_FromLong( ME_OPT_EDGES ) ); } return Modes; diff --git a/source/blender/renderconverter/intern/convertBlenderScene.c b/source/blender/renderconverter/intern/convertBlenderScene.c index 1eeb7486bd4..593910c7a29 100644 --- a/source/blender/renderconverter/intern/convertBlenderScene.c +++ b/source/blender/renderconverter/intern/convertBlenderScene.c @@ -1493,32 +1493,29 @@ static void init_render_mesh(Object *ob) medge= dlm?dlm->medge:me->medge; for(a1=0; a1<end; a1++, medge++) { - - if( (me->flag & ME_OPT_EDGES)==0 || (medge->flag & ME_EDGEDRAW)) { - MVert *v0 = &mvert[medge->v1]; - MVert *v1 = &mvert[medge->v2]; + MVert *v0 = &mvert[medge->v1]; + MVert *v1 = &mvert[medge->v2]; - vlr= RE_findOrAddVlak(R.totvlak++); - vlr->ob= vlr_set_ob(ob); - vlr->v1= RE_findOrAddVert(vertofs+medge->v1); - vlr->v2= RE_findOrAddVert(vertofs+medge->v2); - vlr->v3= vlr->v2; - vlr->v4= NULL; - - xn= (v0->no[0]+v1->no[0]); - yn= (v0->no[1]+v1->no[1]); - zn= (v0->no[2]+v1->no[2]); - /* transpose ! */ - vlr->n[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn; - vlr->n[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn; - vlr->n[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn; - Normalise(vlr->n); - - vlr->mat= ma; - vlr->flag= 0; - vlr->ec= ME_V1V2; - vlr->lay= ob->lay; - } + vlr= RE_findOrAddVlak(R.totvlak++); + vlr->ob= vlr_set_ob(ob); + vlr->v1= RE_findOrAddVert(vertofs+medge->v1); + vlr->v2= RE_findOrAddVert(vertofs+medge->v2); + vlr->v3= vlr->v2; + vlr->v4= NULL; + + xn= (v0->no[0]+v1->no[0]); + yn= (v0->no[1]+v1->no[1]); + zn= (v0->no[2]+v1->no[2]); + /* transpose ! */ + vlr->n[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn; + vlr->n[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn; + vlr->n[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn; + Normalise(vlr->n); + + vlr->mat= ma; + vlr->flag= 0; + vlr->ec= ME_V1V2; + vlr->lay= ob->lay; } } } diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 9b2d8d2bc60..196387413fe 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -445,9 +445,6 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me) uiBlockBeginAlign(block); uiBlockSetCol(block, TH_AUTO); - uiDefButBitS(block, TOG, ME_OPT_EDGES, B_SUBSURFTYPE, "Optimal", 10, 94,154,19, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe"); - - uiBlockBeginAlign(block); if(me->medge) val= 1.0; else val= 0.0; uiDefBut(block, LABEL, 0, "Edges", 10,70,70,20, 0, val, 0, 0, 0, ""); diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 328683070d0..6e3401d0582 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -1839,12 +1839,7 @@ static void draw_mesh_fancy(Object *ob, DerivedMesh *baseDM, DerivedMesh *dm, in glDepthMask(0); // disable write in zbuffer, selected edge wires show better } - if (me->flag&ME_OPT_EDGES) { - dm->drawMappedEdges(dm); - } - else { - dm->drawEdges(dm); - } + dm->drawEdges(dm); if (dt!=OB_WIRE) { glDepthMask(1); diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c index 4812c2c0753..015dac2c9b7 100644 --- a/source/blender/src/edit.c +++ b/source/blender/src/edit.c @@ -500,7 +500,6 @@ void count_object(Object *ob, int sel) if(me) { int totvert, totface; - // XXX fixme for modifier stack totvert= me->totvert; totface= me->totface; diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index f25467af57c..29bff2d3532 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -1808,7 +1808,6 @@ static void tb_do_mesh(void *arg, int event){ case 3: G.f ^= G_DRAWFACES; break; case 4: G.f ^= G_DRAWNORMALS; break; case 5: flip_subdivison(OBACT, -1); break; - case 6: me->flag ^= ME_OPT_EDGES; DAG_object_flush_update(G.scene, OBACT, OB_RECALC_DATA); break; } addqueue(curarea->win, REDRAW, 1); } @@ -1821,7 +1820,6 @@ static TBitem tb_mesh[]= { { 0, "Show/Hide Normals", 4, NULL}, { 0, "SEPR", 0, NULL}, { 0, "Subdivision Surface", 5, NULL}, -{ 0, "SubSurf Optimal", 6, NULL}, { 0, "SEPR", 0, NULL}, { 0, "Show/Hide Vertices", 0, tb_obdata_hide}, { -1, "", 0, tb_do_mesh}}; |