Notifications
Clear all

[Closed] [MAXScript] Create A Line With Bezier Tangents

Hello,

I’m working from the example in the documentation which cover how to create a line between two points, but specifically from the start to end points of a bone with Bezier tangent types rather than corner.

I can create the tangents, but when I try to move the tangent handles the curve doesn’t update.

Here’s the code:


(
	delete objects
	
	theBone = boneSys.createBone [0,0,0] [30,10,0] [0,0,1]

	fn drawLineBetweenTwoPoints pointA =
	(
		ss = SplineShape pos:pointA.pos
		addNewSpline ss
		addKnot ss 1 #bezier #line PointA.pos PointA.pos (PointA.pos + PointA.transform.row1 * PointA.length * 1.0/3)
		addKnot ss 1 #bezier #line (PointA.pos + PointA.transform.row1 * PointA.length) (PointA.pos + PointA.transform.row1 * PointA.length * 2.0/3) (PointA.pos + PointA.transform.row1 * PointA.length)
		updateShape ss
		ss
	)
	drawLineBetweenTwoPoints theBone
)

Thanks,
-Harry

2 Replies

see the changes in red

Excellent, thanks!