Fixing mixed code and declaration.
PEOPLE, PLEASE CHECK YOUR WARNINGS BEFORE COMMIT
This commit is contained in:
@@ -996,6 +996,10 @@ void mesh_to_curve(Scene *scene, Object *ob)
|
|||||||
EdgeHash *eh = BLI_edgehash_new();
|
EdgeHash *eh = BLI_edgehash_new();
|
||||||
EdgeHash *eh_edge = BLI_edgehash_new();
|
EdgeHash *eh_edge = BLI_edgehash_new();
|
||||||
|
|
||||||
|
ListBase edges = {NULL, NULL};
|
||||||
|
EdgeLink *edl;
|
||||||
|
|
||||||
|
|
||||||
mf= mface;
|
mf= mface;
|
||||||
for (i = 0; i < totface; i++, mf++) {
|
for (i = 0; i < totface; i++, mf++) {
|
||||||
if (!BLI_edgehash_haskey(eh, mf->v1, mf->v2))
|
if (!BLI_edgehash_haskey(eh, mf->v1, mf->v2))
|
||||||
@@ -1014,9 +1018,6 @@ void mesh_to_curve(Scene *scene, Object *ob)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ListBase edges = {NULL, NULL};
|
|
||||||
EdgeLink *edl;
|
|
||||||
|
|
||||||
med= medge;
|
med= medge;
|
||||||
for(i=0; i<totedge; i++, med++) {
|
for(i=0; i<totedge; i++, med++) {
|
||||||
if (!BLI_edgehash_haskey(eh, med->v1, med->v2)) {
|
if (!BLI_edgehash_haskey(eh, med->v1, med->v2)) {
|
||||||
@@ -1042,20 +1043,24 @@ void mesh_to_curve(Scene *scene, Object *ob)
|
|||||||
MEdge *med_current= ((EdgeLink *)edges.last)->edge;
|
MEdge *med_current= ((EdgeLink *)edges.last)->edge;
|
||||||
int startVert= med_current->v1;
|
int startVert= med_current->v1;
|
||||||
int endVert= med_current->v2;
|
int endVert= med_current->v2;
|
||||||
|
int ok= TRUE;
|
||||||
|
|
||||||
|
Nurb *nu;
|
||||||
|
BPoint *bp;
|
||||||
|
VertLink *vl;
|
||||||
|
|
||||||
appendPolyLineVert(&polyline, startVert); totpoly++;
|
appendPolyLineVert(&polyline, startVert); totpoly++;
|
||||||
appendPolyLineVert(&polyline, endVert); totpoly++;
|
appendPolyLineVert(&polyline, endVert); totpoly++;
|
||||||
BLI_freelinkN(&edges, edges.last); totedges--;
|
BLI_freelinkN(&edges, edges.last); totedges--;
|
||||||
|
|
||||||
int ok= TRUE;
|
|
||||||
|
|
||||||
while(ok) {
|
while(ok) {
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
i= totedges;
|
i= totedges;
|
||||||
while(i) {
|
while(i) {
|
||||||
|
MEdge *ed= edl->edge;
|
||||||
i-=1;
|
i-=1;
|
||||||
edl= BLI_findlink(&edges, i);
|
edl= BLI_findlink(&edges, i);
|
||||||
MEdge *ed= edl->edge;
|
|
||||||
|
|
||||||
if(ed->v1==endVert) {
|
if(ed->v1==endVert) {
|
||||||
endVert = ed->v2;
|
endVert = ed->v2;
|
||||||
@@ -1092,8 +1097,6 @@ void mesh_to_curve(Scene *scene, Object *ob)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* --- nurbs --- */
|
/* --- nurbs --- */
|
||||||
Nurb *nu;
|
|
||||||
BPoint *bp;
|
|
||||||
|
|
||||||
/* create new 'nurb' within the curve */
|
/* create new 'nurb' within the curve */
|
||||||
nu = (Nurb *)MEM_callocN(sizeof(Nurb), "MeshNurb");
|
nu = (Nurb *)MEM_callocN(sizeof(Nurb), "MeshNurb");
|
||||||
@@ -1107,7 +1110,7 @@ void mesh_to_curve(Scene *scene, Object *ob)
|
|||||||
nu->bp= (BPoint *)MEM_callocN(sizeof(BPoint)*totpoly, "bpoints");
|
nu->bp= (BPoint *)MEM_callocN(sizeof(BPoint)*totpoly, "bpoints");
|
||||||
|
|
||||||
/* add points */
|
/* add points */
|
||||||
VertLink *vl= polyline.first;
|
vl= polyline.first;
|
||||||
for (i=0, bp=nu->bp; i < totpoly; i++, bp++, vl=vl->next) {
|
for (i=0, bp=nu->bp; i < totpoly; i++, bp++, vl=vl->next) {
|
||||||
VecCopyf(bp->vec, mverts[vl->index].co);
|
VecCopyf(bp->vec, mverts[vl->index].co);
|
||||||
bp->f1= SELECT;
|
bp->f1= SELECT;
|
||||||
|
|||||||
Reference in New Issue
Block a user