アクションのインタフェースは、すべての パーティクル フロー アクション クラスで公開されます。
メソッド:
<bool>init <IObject>container <object>particleSystem <node>particleSystemNode <&object array>actions <&node array>actionNodes
actions is In and Out parameter
actionNodes is In and Out parameter
アクションを初期化します。Script_Operator オペレータの on Init... ハンドラの内部からアクションの Init メソッドを呼び出せます。例については、「[スクリプト オペレータ](Script Operator)サンプル内の Speed オペレータ」を参照してください。
<bool>release <IObject>container
特定のパーティクル コンテナを解放します。Script_Operator オペレータの on Release... ハンドラの内部からアクションの Release メソッドを呼び出せます。例については、「[スクリプト オペレータ](Script Operator)サンプル内の Speed オペレータ」を参照してください。
<interval by value>activityInterval ()
アクティビティの間隔を返します。
子を作成 (パーティクルを生成) できるアクションの場合、true を返します。
アクションが実行可能でない場合、true を返します。
アクションがランダム化をサポートしている場合、true を返します。
現在のランダム シード値を返します。
<void>setRand <integer>randomSeed
指定された 整数値をランダム シードに設定します。
新しいランダム シードを生成し、その値を返します。
アクションがマテリアル ホルダである場合、true を返します。
アクションがマテリアル ホルダである場合、マテリアルを返します。このメソッドは、.isMaterialHolder() によって false の返されるアクションではサポートされません。
<bool>setMaterial <material>material
マテリアルを設定し、成功したら true を返します。このメソッドは、.isMaterialHolder() によって false の返されるアクションではサポートされません。
<bool>supportScriptWiring()
アクションがスクリプト ワイヤリングをサポートしている場合、true を返します
インスタンス化したアクションをそのイベントで固有のコピーに変換します。
例と結果
|
--Create a Find_Target action
ft = find_target()
$Find_Target:Find Target 01 @ [0.000000,0.000000,0.000000]
--Create a Birth_Script action
bs = birth_script()
$Birth_Script:Birth Script 01 @ [0.000000,0.000000,0.000000]
&endash;-Create a Material_Dynamic action
md = material_dynamic()
$Material_Dynamic:Material Dynamic 01 @ [0.000000,0.000000,0.000000]
--Create a Force action
fc = force()
$Force:Force 01 @ [0.000000,0.000000,0.000000]
--Does it create particle?
--No, Find_Target doesn’t
ft.isFertile()
false
bs.isFertile()
true
--Are they non-executable?
ft.isNonExecutable()
false
bs.isNonExecutable()
false
--Do they support randomization?
ft.supportRand()
true
--Does this Action support Randomization? Yes!
bs.supportRand()
true
--Get the current random seed of the Find_Target
ft.getRand()
12345
--Set a new random seed
ft.setRand 23456
OK
--Get the new random seed
ft.getRand()
23456
--Generate new random seed
ft.newRand()
30642
--Get the new random seed
ft.getRand()
30642
--Check if the action is a material holder - This one isn’t...
ft.isMaterialHolder()
false
--...But this one is
md.isMaterialHolder()
true
--This one doesn’t have a material assigned yet &endash;
-- nothing to get yet.
md.getMaterial()
undefined
--Assign a new material
md.setMaterial (standard name:"PF")
true
--Now try to get the material again - It is there now!
md.getMaterial()
PF:Standard
--Does Find_Target support Wiring?
--No, it doesn’t.
ft.supportScriptWiring()
false
--Does Force support Wiring?
--Yes, it does!
fc.supportScriptWiring()
true
|
このインタフェースは下記で使用できます。
Age_Test : ヘルパー
Birth : ヘルパー
Birth_Paint : Helper
Birth_Script : ヘルパー
Birth_Texture : Helper
Cache : ヘルパー
Collision : ヘルパー
Collision_Spawn : ヘルパー
DeleteParticles : ヘルパー
Find_Target : ヘルパー
Force : ヘルパー
Go_To_Rotation : ヘルパー
Initial_State : Helper
Keep_Apart : ヘルパー
mapping : ヘルパー
Material_Dynamic : ヘルパー
Material_Frequency : ヘルパー
Material_Static : ヘルパー
Notes : ヘルパー
PF_Source : GeometryClass
Position_Icon : ヘルパー
Position_Object : ヘルパー
rotation : ヘルパー
Scale_Test : ヘルパー
Script_Test : ヘルパー
Script_Operator : ヘルパー
Send_Out : ヘルパー
shapeStandard : ヘルパー
Shape_Facing : ヘルパー
Shape_Instance : ヘルパー
Shape_Mark : ヘルパー
Spawn : ヘルパー
Speed : ヘルパー
SpeedByIcon : ヘルパー
Speed_By_Surface : ヘルパー
Speed_Test: ヘルパー
Split_Amount : ヘルパー
Split_Selected : ヘルパー
Split_Source : ヘルパー