Notifications
Clear all
[Closed] How do I create a Line (spline) with Maxscript?
Jan 26, 2009 8:21 pm
Hi guys, i’m looking for the way to create a line in maxscript. So far, i’m able to create the line with line() but it doesn’t have any vertices. Can somebody help me.
Thanks for your time.
3 Replies
1 Reply
*Open the MAXScript Reference.
*Go to the topic “How do I create a line between two points?”
*See also “How To … Draw a Freehand Spline”
Jan 26, 2009 8:21 pm
When you create a Shape, you need to add a spline
a = line()
addnewspline a
then add a knot (vertex)
SplineShape : Shape[left][b][b]addKnot[/b][/b] <shape> <spline_index_integer> \
[/left]
[left]( [b][b]#smooth[/b][/b] | [b][b]#corner[/b][/b] | [b][b]#bezier[/b][/b] | [b][b]#bezierCorner[/b][/b] ) \
[/left]
[left]( [b][b]#curve[/b][/b] | [b][b]#line[/b][/b] ) <position_point3> \
[/left]
[left][invec_point3 outvec_point3] \
[/left]
[left][where_integer]
[/left]
[left]Adds a new knot (control point) to the indexed spline and returns an integer reflecting the index of the newly added knot. The 3rd argument specifies the type of the knot, the 4th specifies the type of the segment leaving the knot. The 5th specifies the coordinates for the new point (given in the current working coordinate system). If the knot type is [b][b]bezier[/b][/b] or [b][b]bezierCorner[/b][/b], you must give the in-vector and out-vector handle coordinates as the 6th and 7th arguments. In the same way as splines are indexed in a shape, knots are indexed in a spline. The optional last argument lets you specify where in the knot order the new knot is to be inserted, defaulting to the end of the spline if you leave this argument off.
[/left]
Look in the help under “Splineshape : Shape “