prim_attribute VEX function

Evaluates the attribute string att for primitive pn at the parametric location u, v.

Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex

  1. int prim_attribute(string filename, int adata&, string att, int pn, float u, float v)

  2. int prim_attribute(string filename, float adata&, string att, int pn, float u, float v)

  3. int prim_attribute(string filename, vector adata&, string att, int pn, float u, float v)

  4. int prim_attribute(string filename, vector4 adata&, string att, int pn, float u, float v)

  5. int prim_attribute(string filename, matrix adata&, string att, int pn, float u, float v)

  6. int prim_attribute(string filename, matrix3 adata&, string att, int pn, float u, float v)

Evaluates the attribute string att for primitive pn at the parametric location u, v. The result is stored in adata, which can be one of several different forms. In either case, if the attribute data is of a smaller size than adata an error of 0 is returned. For example if attribute "Cd" is a vector, adata cannot be a matrix or any another structure which can store more than 3 values. prim_attribute returns 1 upon successful completion.