アニメーション
指定したオブジェクトにあるすべてのアニメーションをクリップボードにコピーします。 ParameterMask
を使用し、どのパラメータからコピーするのかを指定します。 これにより、パラメータを明示的に InputObjs
のターゲットに指定する必要がなくなります。
通常、このコマンドはパスでパラメータを一致させます。
パスで検索してもパラメータが見つからない場合は、列挙されている順にパラメータをコピーしようとします。 たとえば、kine.pos で
CopyAllAnimation2 が実行されている場合は、x、y、z
をシェーダの赤、緑、青にコピーします(そこに貼り付けられている場合)。
オブジェクト間のアニメーションをコピーするには、このコマンドと PasteAllAnimation を併用します。
CopyAllAnimation
の代わりにこのコマンドを使用します。
CopyAllAnimation2( InputObjs, [SourceMask], [ParameterMask], [RemoveAnimation], [BaseAnimation], [LayerAnimation] ); |
| パラメータ | タイプ | 詳細 |
|---|---|---|
| InputObjs | オブジェクトまたはプロパティ名(任意の選択可能なもの) | コピーするアニメーションを格納したオブジェクト(またはプロパティ) |
| SourceMask | siSourceType | 削除するアニメーションの種類。 現バージョンでは F カーブとエクスプレッションのみがコピーされます。 デフォルト値: siAnySource |
| ParameterMask | siParameterFilter | コピーするアニメーションを含むパラメータ。
デフォルト値: siAllParam |
| RemoveAnimation | ブール | True の場合、コピー後にアニメーションを接続解除します(現在はサポートしていません)。
デフォルト値: false |
| BaseAnimation | ブール | True の場合、コマンドはベース レイヤ上のアニメーションをコピーします。
デフォルト値: True |
| LayerAnimation | ブール | True の場合、コマンドはベース レイヤを除くすべてのレイヤ上のアニメーションをコピーします。
デフォルト値: True |
/*
This example demonstrates how to copy the scaling animation with the
CopyAllAnimation2 command and then paste it onto another object with
the PasteAllAnimation command.
*/
NewScene( "", false );
// Create a disc and animate its scaling in X
var disc1 = CreatePrim( "Disc", "MeshSurface" );
var keys = new Array( 2, 1.4, 47, 2, 84, 0.15 );
disc1.sclx.AddFCurve2( keys );
// Create another disc onto which we will paste this animation
var disc2 = CreatePrim( "Disc", "MeshSurface" );
// Copy the animation from disc1 to disc2 (scaling parameters only)
CopyAllAnimation2( disc1, siAnySource, siScl );
PasteAllAnimation( disc2, true );
// Now delete disc1 just to prove that the animation you see is
// really on disc2, then start the playback
DeleteObj( disc1 );
PlayForwardsFromStart();
// You will see that the disc still scales up and down, even though the
// original disc has been deleted.
|