v3.0
Moves the left handle of a point on a Bezier 2D shape to adjust
its shape. This is the scripting equivalent of clicking and
dragging anywhere on the line between any two points on a Bezier
shape to get the handles and then adjusting the left handle.
Note: You can also use the Move2DShapePoint command to move a
point on the shape.
Move2DShapeLHandle( [Shape], [index], [x], [y] ); |
| Parameter | Type | Description |
|---|---|---|
| Shape | String | Parameter path name for
the shape whose handles you are moving.
Default Value: Current
selection. |
| index | Long | Specifies the index of the point to manipulate.
Default Value: If no value is specified for this argument, the left handle on the first point in the shape is moved. |
| x | Double | Specifies the new position in X for the handle.
Default Value: 0 |
| y | Double | Specifies the new position in Y for the handle.
Default Value: 0 |
'
' This example demonstrates how to set a garbage matte mask for a
' ColorCorrect operator in the FxTree and then use the bezier handles
' to refine it.
'
' Create a new FxTree
set oTree = CreateFxTree()
' Get the projects path for the current system
sPath = InstallationPath( siProjectPath )
set oClip = CreateImageClip( sPath & "\Pictures\noIcon.pic", "NewClip" )
' Use the clip to create a new image clip operator
set oOperator = AddImageClipFxOp( oTree, oClip )
' Add a Color Correct operator to the same tree
set oCCOp = AddFxOp( oTree, "Color Correct" )
' Connect the two operators
ConnectFxOp oOperator, oCCOp, "1"
' Since the ConnectFxOp command does not return the new operator,
' you need to get it from the OperatorCollection on the FxTree object
for each oMember in oTree.FxOperators
if oMember.Name = "ColorCorrect" then
set oGBMatteOp = oMember
exit for
end if
next
' Adjust the HSV Offset and Gain levels so you can see the
' results of the color correction
SetValue oGBMatteOp.FullName & ".MasterHueShift," _
& oGBMatteOp.FullName & ".MasterOffset," _
& oGBMatteOp.FullName & ".MasterGain", _
Array(0, 0.820731514055631, 0.852844886888196)
' Add the 2D shape (mask shape) to the GarbageMatte and reshape it so you can see
' the shape when you open the Fx Viewer with the ColorCorrect operator selected
set oRotospline = Add2DShape( oGBMatteOp & ".GarbageShapes", "Bezier" )
Move2DShapePin oRotospline, 124.333333333333, 145.166666666667
aPointPositions = Array(56, 207, 196, 170, 179, 85, 132, 142, 108, 105, 75, 162)
Add2DShapePointArray oRotospline, aPointPositions
' Move the right handle of the first point and the left handle of the second
' point to create an arc on the top part of the shape
Move2DShapeRHandle oRotospline, , 15.0845123157596, 50.9829157526202
Move2DShapeLHandle oRotospline, 1, 15.0845123157597, 50.9829157526202
|