オブジェクトに、アニメートされるパラメータがある場合は、True を戻します。
注: このコマンドは、出力引数を使用します。C# および一部のスクリプト言語(JScript、PerlScript、Python など)は、リファレンスによって渡される引数をサポートしていません。通常、出力引数は XSIApplication.ExecuteCommand メソッド(C#)または ISIVTCollection (スクリプト言語)を介して取得できますが、このコマンドはすでに値を返しています。
この場合の唯一の回避策は、出力引数と戻り値の両方を 1 つの配列で戻す VBScript のカスタム コマンドを作成することです。詳細については、「関数がすでに値を戻している場合の処理について」を参照してください。
oBoolean = IsAnimated( [InputObj], SourceMask, [BranchFlag], [AnimComponents], [Local] ); |
Boolean
オブジェクトにアニメートされたパラメータがある場合は True、ない場合は False を戻します。
| パラメータ | タイプ | 説明 |
|---|---|---|
| InputObj | 文字列 |
テストするオブジェクト。 デフォルト値:現在選択されているオブジェクト |
| SourceMask | siSourceType |
アニメーション ソースの種類 デフォルト値: siAnySource |
| BranchFlag | siBranchFlag |
ブランチまたはノードからアニメーションを削除します。 デフォルト値: siUnspecified |
| AnimComponents | XSICollection | アニメートされるパラメータを戻します。 |
| Local | Boolean |
集めるアニメーションが、オブジェクトに対してローカルかどうかを指定します。 フラグが True の場合は、伝搬されたプロパティまたは中間ノードの、アニメートされているすべてのパラメータが無視されます。 中間ノードはオブジェクトの下にネストされていますが、オブジェクト自体に所有されているとは限りません。 たとえば、Texture_Projection_Def プロパティの下にネストされているカメラ オブジェクトは、ターゲット オブジェクトがプロジェクション プロパティ自体でない限り、考慮されません。 フラグに False が設定されている場合は、すべてのパラメータが対象となります。
デフォルト値: False |
' If an object has animated parameters, output a message
' that looks like this:
'
' INFORMATION : "cone has the following animated parameters:
'
' X Parameter (cone.kine.local.posx)
' Y Parameter (cone.kine.local.posy)
' Z Parameter (cone.kine.local.posz)"
sub myIsAnimated ()
dim fcurves, expressions
dim p, params
dim object, button
dim msg
PickElement "object", "Pick object", "Pick object", object, button
fcurves = IsAnimated( object, siFcurveSource, siUnspecified, params )
expressions = IsAnimated( object, siExpressionSource, siUnspecified, params )
if ( fcurves ) then
msg = object & " has fcurves for the following parameters: " & Chr(10)
for each p in params
msg = msg & Chr(10) & Chr(9) & p.name & " " & p.type & " (" & p & ")"
next
LogMessage msg
end if
if ( expressions ) then
msg = object & " has expressions for the following parameters: " & Chr(10)
for each p in params
msg = msg & Chr(10) & Chr(9) & p.name & " " & p.type & " (" & p & ")"
next
LogMessage msg
end if
if not ( fcurves or expressions ) then
LogMessage object & " has no animated parameters"
end if
end sub
' Remove animation from the parameters on a picked object
sub myRemoveAnimation ()
dim animated, p, params
dim object, button
PickElement "object", "Pick object", "Pick object", object, button
animated = IsAnimated( object, siAnySource, params )
if ( animated ) then
RemoveAnimation params
end if
end sub |
// JScript sample showing how to use the object model for getting the animated
// parameters of a 3D object.
var grid = CreatePrim( "Grid", "MeshSurface" );
SaveKey( "/kine.local.pos", null, 1 );
var params = grid.NodeAnimatedParameters( siAnySource );
for ( var i = 0; i < params.Count; i++ )
{
LogMessage( params(i) );
} |