Since | 19.0 |
<type> usd_iprimvar(<stage>stage, string primpath, string name)
<type>[] usd_iprimvar(<stage>stage, string primpath, string name)
<type> usd_iprimvar(<stage>stage, string primpath, string name, float timecode)
<type>[] usd_iprimvar(<stage>stage, string primpath, string name, float timecode)
This function returns a value of a primvar on a given primitive or inherited from primitive’s ancestor.
<stage>
ノードのコンテキスト内(例えば、Wrangle LOP)で実行する時、ステージの読み込み先となる(0から始まる)入力番号を表現した整数をこの引数に指定することができます。 この整数は、特定の入力を参照する文字列形式(例えば、“opinput:0”)と等価です。
primpath
Primのパス。
name
Primvar name (without namespace).
timecode
アトリビュートが評価されるUSDタイムコード。 USDタイムコードはHoudiniのフレームにほぼ一致します。 指定しなかった場合、現行フレームに相当するタイムコードが使用されます。
Returns
The 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 some primvars on the cube primitive or cube's ancestor. vector vec_value = usd_iprimvar(0, "/geo/cube", "vec_primvar_name"); float values[] = usd_iprimvar(0, "/geo/cube", "primvar_name"); float value = usd_iprimvar(0, "/geo/cube", "primvar_name", 3); v[]@foo_at_current_frame = usd_iprimvar(0, "/geo/sphere", "foo"); v[]@foo_at_frame_8 = usd_iprimvar(0, "/geo/sphere", "foo", 8.0);
See also | |
usd | |
usd_primvar |
|