diff options
-rw-r--r-- | source/blender/blenkernel/BKE_displist.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 15 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_mods.c | 2 | ||||
-rw-r--r-- | source/blender/python/generic/geometry.c | 2 |
4 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h index febe0a11ae6..9e75e55adf6 100644 --- a/source/blender/blenkernel/BKE_displist.h +++ b/source/blender/blenkernel/BKE_displist.h @@ -99,7 +99,7 @@ extern void shadeMeshMCol(struct Scene *scene, struct Object *ob, struct Mesh *m int surfindex_displist(DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4); void imagestodisplist(void); void reshadeall_displist(struct Scene *scene); -void filldisplist(struct ListBase *dispbase, struct ListBase *to); +void filldisplist(struct ListBase *dispbase, struct ListBase *to, int flipnormal); void fastshade_free_render(void); diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index ae225fd19b7..a958d8c353b 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -925,7 +925,7 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase) } -void filldisplist(ListBase *dispbase, ListBase *to) +void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal) { EditVert *eve, *v1, *vlast; EditFace *efa; @@ -1019,6 +1019,9 @@ void filldisplist(ListBase *dispbase, ListBase *to) index[0]= (intptr_t)efa->v1->tmp.l; index[1]= (intptr_t)efa->v2->tmp.l; index[2]= (intptr_t)efa->v3->tmp.l; + + if(flipnormal) + SWAP(int, index[0], index[2]); index+= 3; efa= efa->next; @@ -1095,13 +1098,13 @@ static void bevels_to_filledpoly(Curve *cu, ListBase *dispbase) dl= dl->next; } - filldisplist(&front, dispbase); - filldisplist(&back, dispbase); + filldisplist(&front, dispbase, 1); + filldisplist(&back, dispbase, 0); freedisplist(&front); freedisplist(&back); - filldisplist(dispbase, dispbase); + filldisplist(dispbase, dispbase, 0); } @@ -1113,7 +1116,7 @@ static void curve_to_filledpoly(Curve *cu, ListBase *nurb, ListBase *dispbase) bevels_to_filledpoly(cu, dispbase); } else { - filldisplist(dispbase, dispbase); + filldisplist(dispbase, dispbase, 0); } } @@ -1315,7 +1318,7 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba ModifierData *preTesselatePoint; Curve *cu= ob->data; ListBase *nurb= cu->editnurb?cu->editnurb:&cu->nurb; - int required_mode, totvert; + int required_mode, totvert = 0; int editmode = (!forRender && cu->editnurb); DerivedMesh *dm= NULL, *ndm; float (*vertCos)[3] = NULL; diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 4bc5030094e..5ac70d8f54c 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -186,7 +186,7 @@ static void draw_triangulated(short mcords[][2], short tot) } /* do the fill */ - filldisplist(&lb, &lb); + filldisplist(&lb, &lb, 0); /* do the draw */ dl= lb.first; /* filldisplist adds in head of list */ diff --git a/source/blender/python/generic/geometry.c b/source/blender/python/generic/geometry.c index 18907bb3012..586c6a3406d 100644 --- a/source/blender/python/generic/geometry.c +++ b/source/blender/python/generic/geometry.c @@ -419,7 +419,7 @@ static PyObject *M_Geometry_PolyFill( PyObject * self, PyObject * polyLineSeq ) } else if (totpoints) { /* now make the list to return */ - filldisplist(&dispbase, &dispbase); + filldisplist(&dispbase, &dispbase, 0); /* The faces are stored in a new DisplayList thats added to the head of the listbase */ |