Since | 19.0 |
int usd_iprimvarelementsize(<stage>stage, string primpath, string name)
This function returns the element size of a primvar found directly on the given primitive or inherited from primitive’s ancestor.
The primvar element size applies to array primvars, but it does not encode the length of the array. It specifies how many consecutive array elements should be taken as an atomic element to be interpolated over a gprim. So, on a mesh, array length relates to element size like this array_length = element_size * face_count
.
In most cases, the element size is 1
.
Note, element size is a USD concept and differs from the VEX tuple size obtained with usd_iprimvarsize or the VEX array length obtained with usd_iprimvarlen.
<stage>
ノードのコンテキスト内(例えば、Wrangle LOP)で実行する時、ステージの読み込み先となる(0から始まる)入力番号を表現した整数をこの引数に指定することができます。 この整数は、特定の入力を参照する文字列形式(例えば、“opinput:0”)と等価です。
primpath
Primのパス。
name
Primvar name (without namespace).
Returns
The primvar’s element size.
Examples
// Get the element size of a primvar on the cube primitive or its ancestor. int element_size = usd_iprimvarelementsize(0, "/geo/cube", "primvar_name");
See also | |
usd | |
usd_primvar |
|