アニメーションあにめーしょん

\[ with \] animate` <boolean_expr>` context corresponds to setting the Auto Keybutton in the **3ds Max** user interface. Placing an expression, operation, or block-expression within ananimate oncontext causes keyframes to be generated whenever an animatable property of a **3ds Max** object is changed, regardless of the actual state of the **Auto Key** button. Likewise, placing an expression within ananimate off`` の場合、3ds Max オブジェクトのアニメート可能プロパティが変更されてもキーフレームは生成されません。3ds Max オブジェクトのアニメート可能プロパティを変更する式で animate コンテキスト内に入っていないものは、[オート キー](Auto Key)ボタンがオンのときだけキーフレームを生成します。

animate コンテキストをオンあるいはオフにしても、[オート キー](Auto Key)ボタンの状態には影響はありません。[オート キー](Auto Key)ボタンの状態は、グローバル変数 animButtonState を使用して取得および設定できます。ユーザが[オート キー](Auto Key)ボタンの状態を変更できないようにするには、グローバル変数 animButtonEnabled でコントロールします。

例:

    obj=box()
    liftHeight=50
    tStart=0
    tEnd=60
    loadheight=obj.pos.z
    -- lift object, no key generated
    animate off
    obj.pos.z=loadheight+liftHeight
    -- Create key at time tStart to keep object lifted until that time.
    -- If tStart != 0, a key will also automatically be created at frame 0.
    -- Then create a key at time tEnd to drop the object
    with animate on
    (
      at time tStart obj.pos.z=loadheight+liftHeight
      at time tEnd obj.pos.z=loadheight
    )

新規ユーザーのための経緯説明:

バージョン 5 以前の 3ds Max では、[オート キー](Auto Key)ボタンのことを[アニメート] (Animate)と呼んでいました。MAXScript には、[オート キー](Auto Key)ボタンや[セット キー](Set Key)ボタンがない 3ds Max 2 で初めて導入されて以来、互換性の理由により変わっていない用語があります。それらの用語には、animate コンテキストの名前や animButtonEnabled グローバル変数の名前が含まれます。3ds Max の新規 UI を反映してこれらの名前を変更すると従来のスクリプトを壊すことになるので、お勧めしません。