diff options
author | Ton Roosendaal <ton@blender.org> | 2008-10-04 19:02:40 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-10-04 19:02:40 +0400 |
commit | a7a4c4113e7e47e55231bc6cac743c4c3e5c18f9 (patch) | |
tree | 2b617d5c6bc6af5af22f3c4da8238487a573ca1e /source/blender/src/drawobject.c | |
parent | 324e1d57ac561360caa3e660804d642aeeeb47c0 (diff) |
Bugfix #17753
Fix for rev 16702 commit to better support per-vertex radius in curves.
It caused the directional lines for 3d curves to not draw correct.
Diffstat (limited to 'source/blender/src/drawobject.c')
-rw-r--r-- | source/blender/src/drawobject.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 2c2dea79170..722b430714b 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -4001,16 +4001,17 @@ static void drawnurb(Base *base, Nurb *nurb, int dt) int skip= nu->resolu/16; while (nr-->0) { /* accounts for empty bevel lists */ + float fac= bevp->radius * G.scene->editbutsize; float ox,oy,oz; // Offset perpendicular to the curve float dx,dy,dz; // Delta along the curve - ox = bevp->radius*bevp->mat[0][0]; - oy = bevp->radius*bevp->mat[0][1]; - oz = bevp->radius*bevp->mat[0][2]; + ox = fac*bevp->mat[0][0]; + oy = fac*bevp->mat[0][1]; + oz = fac*bevp->mat[0][2]; - dx = bevp->radius*bevp->mat[2][0]; - dy = bevp->radius*bevp->mat[2][1]; - dz = bevp->radius*bevp->mat[2][2]; + dx = fac*bevp->mat[2][0]; + dy = fac*bevp->mat[2][1]; + dz = fac*bevp->mat[2][2]; glBegin(GL_LINE_STRIP); glVertex3f(bevp->x - ox - dx, bevp->y - oy - dy, bevp->z - oz - dz); |