Bugfix #17753
authorTon Roosendaal <ton@blender.org>
Sat, 4 Oct 2008 15:02:40 +0000 (15:02 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 4 Oct 2008 15:02:40 +0000 (15:02 +0000)
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.

source/blender/src/drawobject.c

index 2c2dea79170312f0afe3e8c20325f5fb30756714..722b430714bc22ba910c966cd4f86816dec1b7e8 100644 (file)
@@ -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 */
                        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
                                
                                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);
 
                                glBegin(GL_LINE_STRIP);
                                glVertex3f(bevp->x - ox - dx, bevp->y - oy - dy, bevp->z - oz - dz);