On 24/08/2015 at 02:31, xxxxxxxx wrote:
I works ok in R15, but in R16, the spline is displayed twice. Once in the view port / Hud and once normal.

Here the code Draw:
def Draw(self, doc, data, bd, bh, bt, flags) :
################# This is the control points section ####################
p1x = myDict['cp1x']
p1y = myDict['cp1y']
cntrl_p1 = c4d.Vector(p1x,p1y,0) #The first control point(the start of the spline)
p2x = myDict['cp2x']
p2y = myDict['cp2y']
cntrl_p2 = c4d.Vector(p2x,p2y,0) #The second control point
p3x = myDict['cp3x']
p3y = myDict['cp3y']
cntrl_p3 = c4d.Vector(p3x,p3y,0) #The third control point
p4x = myDict['cp4x']
p4y = myDict['cp4y']
cntrl_p4 = c4d.Vector(p4x,p4y,0) #The fourth control point(the end of the splne)
cntrl_points = [cntrl_p1,cntrl_p2,cntrl_p3,cntrl_p4] #A list array containing the control points
bd.SetPointSize(15.0) #Set the size of the points
col = [.9, .1, .1]*4 #Set the color of the CV points
bd.DrawPoints(cntrl_points, col, 3) #Draw the spline Control Points
################# This is the spline's points section ####################
steps = myDict['segments'] #The number of line segments
s_points = smoothPoints(cntrl_points, steps) #The points of the spline
cadr = [1]*924 #Set the color values for the points
bd.SetPointSize(3.0)
bd.DrawPoints(s_points, cadr, 3) #Draw points so we can see where each line in the spline begins/ends
print "_points: ", s_points
#Create a line between two points (except the last point) to create a spline
size = len(s_points)
for i in xrange(0,size-1) :
bd.SetPen(c4d.Vector(1, 1, 1)) #Set color for draw operations
bd.DrawLine2D(c4d.Vector(s_points[i].x,s_points[i].y, 0) , c4d.Vector(s_points[i+1].x,s_points[i+1].y, 0))
c4d.EventAdd()
return c4d.TOOLDRAW_HANDLES|c4d.TOOLDRAW_AXIS
In the documentation I do not see any relevant changes in R15 to R16.
Also, is there a way to display and use Tangents in the viewport / Hud?