v3.0
レンダリング
2D シェイプ(マスク シェイプ)を回転します。 このコマンドは、シェイプを選択して、回転ツール(ColorCorrect
プロパティ エディタ)をクリックし、次にバウンディング
ボックス上の任意のハンドルをドラッグしてオブジェクトを回転させる操作に相当します。
注: シェイプをスケーリングする前に、シェイプのセンターまたはピンの表示位置を変更するほうがよいことがあります。
たとえば、ピンをシェイプの左に移動させた後に回転させると、シェイプは左からピボットされます。
シェイプのピンを移動させるには、Move2DShapePinコマンドを使用します。
Set2DShapeRotation( [Shape], angle ); |
| パラメータ | タイプ | 詳細 |
|---|---|---|
| Shape | 文字列 | スケールするシェイプのパラメータ
パス名。
デフォルト値:
現在選択されている値 |
| angle | ダブル | 新しい回転角を指定します。 |
'
' This example demonstrates how to set a garbage matte mask for a
' ColorCorrect operator in the FxTree, scale it, change the position
' of its center and then rotate it around the new center.
'
' 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", "Polygon" )
Move2DShapePin oRotospline, 114.75, 143
Add2DShapePoint oRotospline, 44, 194
Add2DShapePoint oRotospline, 65, 78
Add2DShapePoint oRotospline, 116, 138
Add2DShapePoint oRotospline, 169, 84
Add2DShapePoint oRotospline, 180, 207
Add2DShapePoint oRotospline, 153, 137
Add2DShapePoint oRotospline, 114, 172
Add2DShapePoint oRotospline, 77, 134
' Make the shape a little smaller
Scale2DShape oRotospline, 0.875486381322957, 0.784615384615384
' Pivot the shape on its bottom right corner
Move2DShapePin oRotospline, 154.75, 69
Set2DShapeRotation oRotospline, -50.6836714968651
|