diff options
author | Jacques Lucke <mail@jlucke.com> | 2019-03-05 21:06:59 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-03-05 21:06:59 +0300 |
commit | 5e8e3c00f2aa8331148c59db40a9ee43ee55438e (patch) | |
tree | 1e268d5e2934887f286bb0be12386e9890a43fbd /source/blender | |
parent | c94db5d1c7ec1c84d35556d96b774100a62bf24b (diff) |
Fix T62112: wrong curve face count
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4452
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index a5e455dd650..f0b7431d989 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -227,12 +227,16 @@ void BKE_displist_count(ListBase *lb, int *totvert, int *totface, int *tottri) int vert_tot = 0; int face_tot = 0; int tri_tot = 0; + bool cyclic_u = dl->flag & DL_CYCL_U; + bool cyclic_v = dl->flag & DL_CYCL_V; switch (dl->type) { case DL_SURF: { + int segments_u = dl->nr - (cyclic_u == false); + int segments_v = dl->parts - (cyclic_v == false); vert_tot = dl->nr * dl->parts; - face_tot = (dl->nr - 1) * (dl->parts - 1); + face_tot = segments_u * segments_v; tri_tot = face_tot * 2; break; } |