移動先: 概要 戻り値 MEL 例.

概要

nParticle selectionItem

nParticle は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。

nParticle コマンドは、ワールド空間ポイントのリストから、新しい nParticle オブジェクトを作成します。nParticle オブジェクトが作成された場合、このコマンドは新しいパーティクル シェイプの名前と、これにコネクトされたパーティクル オブジェクトのディペンデンシー ノードを返します。オブジェクトを照会すると、照会結果を返します。パーティクル ID かパーティクル配列内でのパーティクルの順位を使用すると、パーティクル単位のアトリビュートを照会できます。 オブジェクトを編集した場合は何も返されません。

戻り値

string作成された nParticle オブジェクトの名前。

戻り値の型は照会モードでは照会フラグが基になります。

MEL 例

// Creates a particle object with four particles
nParticle -p 0 0 0 -p 3 5 6 -p 5 6 7 -p 9 9 9;

// Returns the age of the particle with id 5 in object particle1
nParticle -attribute age -id 5 -q nParticle1;

// Returns the velocity of the 7th particle in the currently selected
// particle object
nParticle -attribute velocity -order 7 -q;

// Edits the velocity of the 7th particle in the currently selected
// particle object to be 0.0, 1.0, 0.0
nParticle -e -attribute velocity -order 7 -vectorValue 0.0 1.0 0.0;

// Edits the mass of the particle in "particle1" with id 3 to be 0.7
nParticle -e -attribute mass -id 3 -fv 0.7 nParticle1;