Notifications
Clear all

[Closed] make splines correctly renderable

Hi,

 I just read an old thread ["Spline question" from 2003]( http://forums.cgsociety.org/showthread.php?f=98&t=105735&highlight=renderable).  It's close to my problem but don't give me the right answer I need.
 
 So my problem is: I create a shape consisting of 5 splines via maxscript. After this I toggle the checkbox [b]renderable in renderer/viewport[/b] in the shape modify panel. But in this way only the first spline is correctly "extruded". The second to the fifth have wrong meshes.
 
 For better understanding I will paste my little  testing script and a croped screenshot showing my frontview within upper the scripted shape object and underneath the same shape edited manually.
 
 What do I have to add in my script to get right meshes of all the 5 splines in my shape object like you can see in the screenshot in the front view under the maxscript generated shape on an manual edited clone of the maxscript generated shape?
fn drawLineBetweenTwoPoints pointA pointB =
    
    (
    
      ss = SplineShape pos:pointA
    
      addNewSpline ss
    
      addKnot ss 1 #corner #line PointA
    
      addKnot ss 1 #corner #line PointB
    
      updateShape ss
    
      ss
    
    )
    
    newSpline = drawLineBetweenTwoPoints [0,0,0] [0,0,3]
    
    anzahlSplines=5
    
    for x = 1 to anzahlSplines do
    (
    	addNewSpline newSpline
    	addKnot newSpline (x+1) #corner #line [0,0,0]
    	addKnot newSpline (x+1) #corner #line [x*3,0,3]
    	close newSpline (x+1)
    	updateShape newSpline
    )