補間が扱うパラメータまたは補間オブジェクトから、インデックスの相対値のセットを削除します。
RemoveRelativeValue( InputObj, Index ); |
パラメータ | タイプ | 説明 | ||||
---|---|---|---|---|---|---|
InputObj | 文字列 |
インターポレータが制御しているアニメートされたパラメータ、またはインターポレータ自体。 デフォルト値:現在選択され、マーキングされているパラメータ |
||||
Index | Integer |
削除する相対値のセットのインデックス デフォルト値: 0
|
' This example shows how to remove a set of relative values in the Interpolator object. NewScene, false CreatePrim "Cone", "MeshSurface" CreatePrim "Cube", "MeshSurface" SetExpr "cube.kine.local.posx", "l_interp( cone.kine.global.posx, cone.kine.global.posy )" SetValue "cone.kine.local.posx", 1.5 SetValue "cone.kine.local.posy", 2 SetValue "cube.kine.local.posx", 2.5 SetRelativeValues "cube.kine.local.posx" SetValue "cone.kine.local.posx", 3 SetValue "cone.kine.local.posy", 3.5 SetValue "cube.kine.local.posx", 4 SetRelativeValues "cube.kine.local.posx" numKeys = GetNumRelativeValues( "cube.kine.local.Expression.Interpolator" ) Application.LogMessage "The Interpolator object has " & numKeys & " sets of relative values before calling RemoveRelativeValue" ' Remove relative values set #1 RemoveRelativeValue "cube.kine.local.Expression.Interpolator", 1 numKeys = GetNumRelativeValues( "cube.kine.local.Expression.Interpolator" ) Application.LogMessage "The Interpolator object has " & numKeys & " sets of relative values after calling RemoveRelativeValue" for i = 0 to numKeys - 1 Application.LogMessage "---------------------------" Application.LogMessage "Relative values set #" & i & ":" values = GetRelativeValue( "cube.kine.local.Expression.Interpolator", i ) j = 0 for each item in values if (j = 0) then Application.LogMessage "Controlled value = " & item else Application.LogMessage "Controlling #" & j & " value = " & item end if j = j + 1 next next ' INFO : The Interpolator object has 3 sets of relative values before calling RemoveRelativeValue ' INFO : The Interpolator object has 2 sets of relative values after calling RemoveRelativeValue ' INFO : --------------------------- ' INFO : Relative values set #0: ' INFO : Controlled value = 0 ' INFO : Controlling #1 value = 0 ' INFO : Controlling #2 value = 0 ' INFO : --------------------------- ' INFO : Relative values set #1: ' INFO : Controlled value = 4 ' INFO : Controlling #1 value = 3 ' INFO : Controlling #2 value = 3.5 |