移動先: 概要 戻り値 関連項目 フラグ MEL の例

概要

event [-count uint] [-delete] [-dieAtCollision boolean] [-emit uint] [-list] [-name string] [-proc script] [-random boolean] [-rename string] [-select] [-split uint] [-spread float] [-target string] [object]

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

event コマンドは、コリジョン イベントをパーティクル オブジェクトに割り当てます。 コリジョン イベントは、パーティクル シェイプの複数のアトリビュートに格納されます。 event コマンドはイベント名を返します。

戻り値

string作成用。リスト時は文字配列です。

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

関連項目

collision, particle

フラグ

count, delete, dieAtCollision, emit, list, name, proc, random, rename, select, split, spread, target
ロング ネーム(ショート ネーム) 引数型 プロパティ
-count(-ct) uint queryedit
このイベントを適用する(各パーティクルの)コリジョン数です。ゼロ(デフォルト)は、すべてのコリジョンに適用することを意味します。
-split(-spl) uint queryedit
衝突するパーティクルを指定した数の新しいパーティクルに分割します。これらの新しいパーティクルは、割り当てられたターゲット オブジェクトの一部になります。ターゲットが割り当てられていない場合、パーティクルは同じオブジェクトの一部になります。新しいパーティクルは、分割元のパーティクルの現在の存在時間を継承します。このパーティクルは、ターゲット オブジェクトの速度継承パラメータを使用します。 放出と分割の両方を設定すると、event コマンドは両方を実行します。まず新しいパーティクルを放出してから、オリジナルのパーティクルを分割します。これは、放出と分割が両立しなかった旧バージョンからの変更点です。
-dieAtCollision(-die) boolean queryedit
「count」で指定したコリジョンでパーティクルが消滅します。 count 値が指定されていなければ、最初のコリジョンで消滅します。
-emit(-em) uint queryedit
割り当てられたターゲット オブジェクトに n 個の追加のパーティクルを放出します。 オリジナルの(コリジョン)パーティクルは存在し続け、オリジナルのオブジェクトの中に残ったままです。新しいパーティクルの存在時間はゼロ、質量は放出する側のパーティクルと同じです。このパーティクルは、ターゲット オブジェクトの速度継承パラメータを使用します。
-random(-r) boolean queryedit
-split フラグと -emit フラグを使用します。-random が true に、-split または -emit が n に設定されていれば、1 と n の間で均一に分散されたランダムな数のパーティクルが、イベントで作成されます。
-spread(-sp) float queryedit
コリジョンで作成されるパーティクルは、衝突する側のパーティクルの跳ね返る方向からランダムな量だけスプレッドします。このスプレッドは、90 度の割合(0-1)として指定されます。spread が 0(デフォルト)に設定されていれば、作成された新しいパーティクルはすべて一致します。
-target(-t) string queryedit
パーティクルを放出または分割するターゲット オブジェクトです。-emit フラグまたは -split フラグで作成された新しいパーティクルは、このオブジェクトに加えられます。
-delete(-d)
指定したイベントを削除します。
-name(-n) string
作成しているイベントに名前を割り当てるか、または編集、照会、削除したいイベントを識別します。例を参照してください。
-rename(-re) string
編集しているイベントに新しい名前を割り当てます。例を参照してください。
-list(-ls)
選択したシェイプのイベントを次のようにすべてリスト表示します。event1Name event2Name...。シェイプがまったく識別されない場合、次のようにシェイプのイベントをすべてリスト表示します。 shape1Name event1Name shape2Name event2Name...。文字配列を返します。
-select(-s)
このフラグは現在サポートしていません。-name フラグを参照してください。
-proc(-pr) script
イベントが発生するたびに呼び出す MEL プロシージャを指定します。 これは、次のような引数を持つグローバル プロシージャである必要があります。 global proc procName(string obj, int id, string objHit); 渡される引数はパーティクル オブジェクトの名前、衝突したパーティクルの ID、衝突したオブジェクトの名前です。パーティクル -id -q を使用してパーティクルのアトリビュートの値を取得できます。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : 1 つのコマンドで複数回使用可能なフラグ

MEL の例

event -em 2 -t newCloud;
// At every collision, emit two new particles into the object
// newCloud. The original colliding particles will survive and
// remain in their original object. This event will be
// assigned to the currently selected object.

event -em 2;
// At every collision, emit two new particles into the same object.

event -count 1 -em 2;
// At the first collision for each particle, emit two new particles
// into the same object.
// Subsequent collisions for that same particle will not cause any
// additional particles to be emitted. However, the new particles will
// each emit two new ones at their first collision, since they also
// belong to the object for which this event has been assigned.

event -die true -count 2;
// All particles in the selected object will die at their second
// collision.

event  -count -q -name foo myCloud;
// Return the current value of the count parameter for the event "foo"
// assigned to particle shape myCloud.  The order of the flags is
// important.  Thef lag you are querying (in this case, -count) must
// come before the -q.  The -name flag and the particle object name must
// come after.

event -d -name foo myCloud;
// Delete the event "foo" assigned to particle shape myCloud.

event -e -name foo -emit 2 myCloud;
// Edit the "emit" value of the event "foo" assigned to
// particle shape myCloud.

event -proc myProc myCloud;
// Call the MEL proc "myProc(name, id, name) each time a particle
// of myCloud collides with anything.

event -name oldName -e -rename newName;
// For the selected particle shape, rename the event "oldName" to "newName."