v1.0
オブジェクトの位置アニメーション(アニメーション化された位置パラメータ)をパス アニメーション(カーブのパスに沿ったアニメーション)に変換します。 この変換は、位置アニメーションをカーブにプロットすることによって実行されます(PlotCurveコマンドを参照)。 この処理により、オブジェクトは新しいカーブに拘束され、拘束の比率パラメータが各フレーム ステップにキーとして設定されたパス アニメーションが作成されます(ApplyPath コマンドを参照)。 元の位置アニメーションは削除されます。
ConvertPosAnimToPath( [InputObjs], [Name], [StartTime], [EndTime], [StepFrame] ); |
| パラメータ | タイプ | 説明 |
|---|---|---|
| InputObjs | 文字列 |
位置がアニメートされるオブジェクトのリスト デフォルト値: 選択されたオブジェクト |
| Name | 文字列 |
プロットされたカーブに付ける名前 デフォルト値: 「Path」 |
| StartTime | Double |
変換する最初のフレーム デフォルト値: 0 |
| EndTime | Double |
変換する最後のフレーム デフォルト値: 0 |
| StepFrame | Double |
各ステップのフレーム数 デフォルト値: 1 |
'
' Position animate a null with an modulated sine wave.
' Plot this as a curve, and convert the animation to path animation.
'
dim oNull,i, p
set oNull = GetPrim("Null")
for i = 5 to -5 step -0.1
SetValue oNull & ".kine.local.posx",i
SaveKey oNull & ".kine.local.posx", 50+(i*10)
SetValue oNull & ".kine.local.posz",5*sin(i)*(0.5*sin(20*i))
SaveKey oNull & ".kine.local.posz", 50+(i*10)
next
'
' use the X3DObject.NodeAnimatedParameters property to
' log which parameters are animated before the conversion
'
for each p in oNull.NodeAnimatedParameters( siAnySource )
logmessage "Animated before conversion :" & p.FullName
next
ConvertPosAnimToPath oNull, "Path", 1, 100, 1
'
' use the X3DObject.NodeAnimatedParameters property to
' log which parameters are animated after the conversion
'
for each p in oNull.NodeAnimatedParameters( siAnySource )
logmessage "Animated after conversion :" & p.FullName
next
'Results of running this script:
'INFO : "Animated before conversion :null.kine.local.posx"
'INFO : "Animated before conversion :null.kine.local.posz"
'INFO : "Animated after conversion :null.kine.global.posx"
'INFO : "Animated after conversion :null.kine.global.posy"
'INFO : "Animated after conversion :null.kine.global.posz"
'INFO : "Animated after conversion :null.kine.pathcns.perc" |