Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-09-23 10:26:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-09-23 10:26:48 +0400
commitbcba8003c01d50ffb524092b08026441bbbe4f85 (patch)
treeee8f67293fe9fbe9fda623c46ba5f8739a37ae1c /source/blender/blenkernel/intern/displist.c
parentd2d56e30589caf5bf14f39f21c6a0321e0c01d65 (diff)
changing the number of subdivisions for nurbs curves.
this way each edge/segment gets the same number of points matching the resolution value. before, a nurbs curve would have the same number of points no matter if it was cyclic or not. This will make slight changes to objects on an animated path, but only noticable if the path has a low resolution. bug [#11744] NurbCurve Radius incorrect - now dosnt show bad results with order 4 on non-cyclic curve.
Diffstat (limited to 'source/blender/blenkernel/intern/displist.c')
-rw-r--r--source/blender/blenkernel/intern/displist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 69c8f3406a2..e55006b6c1c 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -858,7 +858,8 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase)
}
}
else if((nu->type & 7)==CU_NURBS) {
- len= nu->pntsu*resolu;
+ len= (resolu*SEGMENTSU(nu))+1;
+
dl= MEM_callocN(sizeof(DispList), "makeDispListsurf");
dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts");
BLI_addtail(dispbase, dl);
@@ -1322,7 +1323,7 @@ void makeDispListSurf(Object *ob, ListBase *dispbase, int forRender)
for (nu=nubase->first; nu; nu=nu->next) {
if(forRender || nu->hide==0) {
if(nu->pntsv==1) {
- len= nu->pntsu*nu->resolu;
+ len= nu->resolu*SEGMENTSU(nu)+1;
dl= MEM_callocN(sizeof(DispList), "makeDispListsurf");
dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts");