CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 01-26-2009, 08:21 PM   #1
Guibou
growing
 
Guibou's Avatar
portfolio
Guibou Guillaume Boucher
3D artist / Animator
Les Studios Longtail
Quebec, Canada
 
Join Date: Feb 2007
Posts: 135
Thumbs down How do I create a Line (spline) with Maxscript?

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.
 
Old 01-26-2009, 08:36 PM   #2
Bobo
Krakatoa Guy
 
Bobo's Avatar
Borislav Petrov
Product Specialist
Thinkbox Software
Vancouver, Canada
 
Join Date: Mar 2002
Posts: 5,327
Quote:
Originally Posted by Guibou
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.


*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"
__________________
Bobo
 
Old 01-26-2009, 08:40 PM   #3
DaveWortley
<database error>
 
DaveWortley's Avatar
portfolio
David Wortley
Technical Director
London, United Kingdom
 
Join Date: Dec 2004
Posts: 1,918
Send a message via MSN to DaveWortley
When you create a Shape, you need to add a spline

Code:
a = line() addnewspline a


then add a knot (vertex)

Code:
SplineShape : Shape
addKnot <shape> <spline_index_integer> \
( #smooth | #corner | #bezier | #bezierCorner ) \
( #curve | #line ) <position_point3> \
[invec_point3 outvec_point3] \
[where_integer]
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 bezier or bezierCorner, 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.


Look in the help under "Splineshape : Shape "
__________________
Maxscript Made Easy...
http://davewortley.wordpress.com/
 
Old 01-27-2009, 04:03 PM   #4
Guibou
growing
 
Guibou's Avatar
portfolio
Guibou Guillaume Boucher
3D artist / Animator
Les Studios Longtail
Quebec, Canada
 
Join Date: Feb 2007
Posts: 135
Thanks for teaching me how to fish Bobo
 
Old 01-27-2009, 04:03 PM   #5
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:28 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.