Notifications
Clear all

[Closed] CurveControl, ccCurve

Hi,

So I want to set some control from CurveControl. But never done it, have no idea how to set this up. In particular, thess expressions interests me the most:

on <curvecontrol> ptChanged <ci> <val> do <expr>
getValue ccCurve <time_value> <float_x> [lookup:<false>]

Help says that <curvecontrol> is a ccCurve.

Yeah… but how do I get this ccCurve? Should I define it first or what?

1 Reply
1 Reply
(@zhalktis)
Joined: 10 months ago

Posts: 0

This doesn’t make sense… <curvecontrol> is clearly the curvecontrol ui element.

ccCurve is a single curve of the curvecontrol. You can access them simply as an array property of the ui element: <curvecontrol>.curves

The <ci> in the ptChanged event is likely the index of the curve that was changed, <val> seems to be the index of the point that was changed.

So it’d be used like:

on myCurveControl ptChanged ci val do 
(
	local valueAtZero = getValue myCurveControl.curves[ci] 0f 0.0
	local valueOfCurrentPoint = myCurveControl.curves[ci].points[val].value
	
	-- Do stuff...
)