diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-09-23 10:26:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-09-23 10:26:48 +0400 |
commit | bcba8003c01d50ffb524092b08026441bbbe4f85 (patch) | |
tree | ee8f67293fe9fbe9fda623c46ba5f8739a37ae1c /source/blender/blenkernel/intern/anim.c | |
parent | d2d56e30589caf5bf14f39f21c6a0321e0c01d65 (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/anim.c')
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index ceb0e132ff9..731c2a18c55 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -52,6 +52,7 @@ #include "DNA_vfont_types.h" #include "BKE_anim.h" +#include "BKE_curve.h" #include "BKE_DerivedMesh.h" #include "BKE_displist.h" #include "BKE_effect.h" @@ -118,7 +119,7 @@ void calc_curvepath(Object *ob) path->len= tot+1; /* exception: vector handle paths and polygon paths should be subdivided at least a factor resolu */ - if(path->len<nu->resolu*nu->pntsu) path->len= nu->resolu*nu->pntsu; + if(path->len<nu->resolu*SEGMENTSU(nu)) path->len= nu->resolu*SEGMENTSU(nu); dist= (float *)MEM_mallocN((tot+1)*4, "calcpathdist"); |