v3.0
一時的なパラメータ値を削除し、シーンを新しく更新します。たとえば、アニメーション F カーブをオブジェクトの位置に適用し、新しいキーを設定せずにその位置を変更する場合は、このコマンドを実行することにより新しい一時パラメータ値を前の値にリセットできます。以下の例を参照してください。
このコマンドは、シーンの 3D ビューをすべて書き換える Refresh コマンドとは異なります。
SceneRefresh(); |
' ' This example sets up an animation fcurve on a null, then sets a temporary value ' on one of the animated parameters, and shows how to remove that temporary value ' using the SceneRefresh command. ' NewScene , false ' Create a null and store the parameter list we will use to set keys. '--------------- ' Note: We are using a combination of Softimage commands and the object model ' here. For example, we are using the OM shortcut oNull.posx in the ' SetValue and SaveKey commands. '--------------- Set oNull = ActiveSceneRoot.AddNull() sParams = oNull.posx & "," & oNull.posy & "," & oNull.posz ' Move the null along the negative X-axis and save a key for frame 1 Translate oNull, -6.07766990291262, -2.37887869051207E-18, _ 3.88513203951106E-02, siRelative, siView, siObj, siXYZ SaveKey sParams, 1 ' Set a key for frame 90 towards the positive X-axis SetValue "PlayControl.Key", 90 SetValue "PlayControl.Current", 90 Translate oNull, 14.2301617773766, -0.743180286278171, _ 7.43180286278171E-02, siRelative, siView, siObj, siXYZ SaveKey sParams, 90 ' Go to frame 30 and display the posx value for that frame. SetValue "PlayControl.Key", 30 SetValue "PlayControl.Current", 30 Application.LogMessage GetValue( oNull.posx ) 'INFO : "-2.52968225317525" ' Set a temporary value on posx SetValue oNull.posx, 2 ' Redisplay the value after setting the posx value but before the scene refresh. Application.LogMessage GetValue( oNull.posx ) 'INFO : "2" ' Remove all temporary values SceneRefresh ' Now display the value from the fcurve again after the scene refresh Application.LogMessage GetValue( oNull.posx ) 'INFO : "-2.52968225317525" |