インタフェース: pfSystem

pfSystem インタフェースは、パーティクル フロー Source クラスによって公開されます

メソッド:

<float><PF_Source>.getMultiplier <time>time     

レンダリング ステータスにしたがって [品質] (Quality)マルチプライヤを返します。レンダリング ステータスの詳細は、下記のメソッド setRenderState および isRenderState を参照してください。

1.0f という値は、オペレータが 100% のレートでパーティクルを生成することを意味しています。0.5f という値は、オペレータが、生成するようにサポートされているパーティクルの半数しか生成しないことを意味しています。たとえば、[発生] (Birth)オペレータが全体で 1000 のパーティクルを生成するように設定されている場合、マルチプライヤが 0.5f に設定されていると、オペレータは 500 のパーティクルしか生成しません。

注: time パラメータは、将来的な使用のために予約されています。0f または任意の時間の値を渡して、メソッドを呼び出します。

    --Create a new Particle Flow Source in the Viewport
    pfs = PF_Source()
    --> $PF_Source:PF Source 001 @ [2.536594,-48.031052,0.000000]
    --Get the Multiplier while in Viewport state
    pfs.getMultiplier 0f
    --> 0.5
    --Change the Particle Source State to Render
    pfs.SetRenderState true
    --> true
    --Get the Multiplier again - when in Render State, the Source
    --generates all particles!
    pfs.getMultiplier 0f
    --> 1.0
<integer><PF_Source>.getBornAllowance()   

発生の許可を返します。これは現在、時間 0 での[上限](Upper Limit)になり、<PF_Source>.Particle_Amount_Limit と同じです。

注:

将来的な使用のために実装されたものです。

<boolean><PF_Source>.hasEmitter()

Particle System にエミッタが存在する場合は true、そうでない場合は false を返します。

<integer><PF_Source>.getEmitterType <time>time

指定された時間のエミッタのタイプを返します。

<void><PF_Source>.getEmitterDimensions <time>time <&float array>dimensions

dimensions is In and Out parameter

指定された時間のエミッタ次元を、参照変数内に保存された浮動小数点の配列として返します。

<mesh><PF_Source>.getEmitterGeometry <time>time

指定された時間のエミッタ ジオメトリをメッシュとして返します。

<boolean><PF_Source>.isEmitterGeometryAnimated()

指定されたエミッタ ジオメトリがアニメートされている場合は true、それ以外の場合は false を返します。

<void><PF_Source>.setRenderState <boolean>renderState

パーティクル システムのレンダリング ステータスを、指定されたブール値に設定します。下記の説明を参照してください。

<boolean><PF_Source>.isRenderState()

Particle System がレンダリング ステータスの場合は true、そうでない場合は false を返します。

重要:

パーティクル フロー のパーティクル システムには、レンダリングとビューポートという 2 通りの状態があります。どの時点でも、どちらか一方の状態です。パーティクル システムのパラメータは、レンダリングとビューポートとで異なるので (マルチプライヤの値や、エミッタ ジオメトリなど)、現在どちらの状態にあるのかを認識しておくことが重要です。setRenderState を使用して、パーティクル システムの状態を切り替えることができます。レンダリングの開始時と終了時には、パーティクル フローのパーティクル システムによって自動的に状態が切り替えられます。

<time><PF_Source>.getIntegrationStep()

[インテグレーション ステップ](Integration Step)を時間の値で返します。

<integer><PF_Source>.getUpdateType()

Update Type を整数で返します。

0 : 完了

1 : 進む

<integer><PF_Source>.numParticlesSelected()

選択したパーティクルの数を返します。

<index><PF_Source>.getSelectedParticleID <index>index

インデックスで指定されたパーティクルのパーティクル ID を返します。

<boolean><PF_Source>.isParticleSelected <index>index

インデックスで指定されたパーティクルが選択されている場合はtrue、それ以外の場合は false を返します。

<integer><PF_Source>.numActionListsSelected()

選択されたアクション リストの数を返します。

<node><PF_Source>.getSelectedActionList <index>index

インデックスで指定されたアクション リストを返します。

<boolean><PF_Source>.isActionListSelected <index>index

インデックスで指定されたアクション リストが選択されている場合は true、それ以外の場合はfalse を返します。

例と結果:

    --Create a new Particle Flow Source in the Viewport
    --from the Create tab, then get it by name from the scene
    pf = $'PF Source 001'
    --> $PF_Source:PF Source 001 @ [0.000000,0.000000,0.000000]
    --Get the number of particles that the Source can give birth to
    pf.getBornAllowance()
    --> 100000
    --Check whether the Source has an emitter
    pf.hasEmitter()
    --> true
    --Get the emitter type
    pf.getEmitterType 0
    --> 0
    dim = #()--define an empty array
    --> #()
    --get the Emitter dimensions,
    --pass the empty array variable by reference
    pf.getEmitterDimensions 0 &dim
    --> OK
    --look into the previously empty array -
    --the dimensions are in it
    Dim
    --> #(20.0, 20.0)
    --Get the Emitter Geometry as TriMesh on frame 0
    m = pf.getEmitterGeometry 0
    --> TriMesh
    m.numverts--check the number of vertices
    --> 4
    m.numfaces--check the number of faces
    --> 2
    --Check if the emitter geometry is animated
    pf.isEmitterGeometryAnimated()
    --> false
    --Set and get the render state
    pf.setRenderState false
    --> OK
    pf.isRenderState()
    --> false
    pf.setRenderState true
    --> OK
    pf.isRenderState()
    --> true
    --Get the viewport integration step
    pf.getIntegrationStep()
    --> 1f
    --Get the update type - 0 means Complete!
    pf.getUpdateType()
    --> 0
    --Get the number of selected particles
    pf.numParticlesSelected()
    --> 0
    --Check if particle 1 is selected
    pf.isParticleSelected 1
    --> false
    --Get the number of selected Action Lists in the UI
    pf.numActionListsSelected()
    --> 0
    --In the UI, select the first Action List and try again:
    pf.numActionListsSelected()
    --> 1
    --Get the node of the Action List you just selected:
    pf.getSelectedActionList 1
    --> $Event:Event 01 @ [0.000000,0.000000,0.000000]

このインタフェースは下記で使用できます。

PF_Source : GeometryClass