View Full Version : CurveControl - problem with defining bezier handles

04 April 2008, 10:33 AM
I tried all i could think of, but I'm unable to force the bezier handlers in CurveControl do what I want. I make 4 points in the script, then i want to have bezier handles just nice and flat and to be let's say 10 units from the point to each side (in/out tangent). I have looked into sample script with CurveControl in maxscript help, but there are few things i'm not sure why are they there.

Anyway, this is part of my script, when I run it, first point (corner) doesn't have handles at all (i guess they are hidden in the point itself), second has handle only from left, 3rd is ok and 4th is ok too.

try(closeRolloutFloater TestScript)catch()
rollout MainSettings "Main settings"


rollout ControlCurves "Curves:"
CurveControl CurveControlCurves ""
height:250 width:330 align:#center numCurves:3 visible:true x_range:[0,100]
y_range:[-3,3] scrollValues:[0,100] commandMode:#move_xy asPopup:false

on ControlCurves open do
local colors = #(red, green, blue)
local names = #("Left","Middle","Right")

For I=1 to 3 do
local CurrentCurve=CurveControlCurves.curves[I]
local PointPosition = #(0.0,33.33,66.66,100.0) = names[I]
CurrentCurve.color = colors[I]
CurrentCurve.numPoints = 4

For J=1 to 4 do
CurrentCurvePoint = CurrentCurve.points[J]

CurrentCurvePoint.value = [PointPosition[J],0.9]
CurrentCurvePoint.inTangent = [-10.0,0.0]
CurrentCurvePoint.outTangent = [10.0,0.0]
CurrentCurvePoint.lock_x = true
CurrentCurvePoint.bezier = true
CurrentCurvePoint.corner = false
zoom CurveControlCurves #all

TestScript = newRolloutFloater "Test script" 350 605
addRollout MainSettings TestScript
addRollout ControlCurves TestScript

Could anyone please tell me, why is this happening?

A bonus question - is there a way how to disable adding and deleting points in CurveControl?


CGTalk Moderation
04 April 2008, 10:33 AM
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.