Move2DShapePin

導入

v3.0

カテゴリ

レンダリング

詳細

スケールのピンの位置(センター)を設定します。 このコマンドは、シェイプを選択して、FX Tree 内でシェイプのセンター(ピン マーカ)をクリック アンド ドラッグすることに相当します。

ピンを移動すると、シェイプの回転とスケーリングの方法が変更されます。 たとえば、ピンをシェイプの左に移動させた後に回転させると、シェイプは左からピボットされます。

注: シェイプ全体を移動させる場合は、代わりに Move2DShape コマンドを使用します。

スクリプト構文

Move2DShapePin( [Shape], [x], [y] );

パラメータ

パラメータ タイプ 詳細
Shape 文字列 ピンを移動するシェイプのパラメータ パス名

デフォルト値: 現在選択されている値

注: 現在の選択が有効なシェイプでないと、エラーが発生します。

x ダブル X 軸上におけるセンターの新しい座標を指定

デフォルト値: 0

y ダブル Y 軸上におけるセンターの新しい座標を指定

デフォルト値: 0

VBScript の例

'
' 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

関連項目

Add2DShape Move2DShape Scale2DShape Set2DShapeRotation