Since | 19.0 |
<type>[] usd_flattenediprimvar(<stage>stage, string primpath, string name)
<type>[] usd_flattenediprimvar(<stage>stage, string primpath, string name, float timecode)
This function returns a value of a flattened primvar on a given primitive or inherited from primitive’s ancestor.
Some primvars can be indexed, where the primvar is a compacted array of unique values, and there is an index array to map an entity to the value element. This function expands the compacted array by using the index array, and returns the expanded array of values.
<stage>
ノードのコンテキスト内(例えば、Wrangle LOP)で実行する時、ステージの読み込み先となる(0から始まる)入力番号を表現した整数をこの引数に指定することができます。 この整数は、特定の入力を参照する文字列形式(例えば、“opinput:0”)と等価です。
primpath
Primのパス。
name
Primvar name (without namespace).
timecode
アトリビュートが評価されるUSDタイムコード。 USDタイムコードはHoudiniのフレームにほぼ一致します。 指定しなかった場合、現行フレームに相当するタイムコードが使用されます。
Returns
The flattened value of an existing primvar, or zero/empty value if the primvar does not exist. Use usd_isiprimvar if you want to check whether the primvar exists.
Examples
// Get the value of a flattened primvar on the cube primitive or cube's ancestor. float flat_values[] = usd_flattenediprimvar(0, "/geo/cube", "primvar_name"); f[]@flat_primvar_at_current_frame = usd_flattenediprimvar(0, "/geo/sphere", "bar"); f[]@flat_primvar_at_frame_7 = usd_flattenediprimvar(0, "/geo/sphere", "bar", 7.0);
See also | |
usd | |
usd_primvar |
|