int pointprimuv(<geometry>geometry, int ptnum, int primnum, float &u, float &v)
int pointprimuv(<geometry>geometry, int ptnum, int primnum, vector &uvw)
<geometry>
When running in the context of a node (such as a wrangle SOP), this argument can be an integer representing the input number (starting at 0) to read the geometry from.
Alternatively, the argument can be a string specifying a geometry file (for example, a .bgeo
) to read from. When running inside Houdini, this can be an op:/path/to/sop
reference.
ptnum
The point number of the intrinsic uv location.
primnum
The primitive number of the intrinsic uv location. Note, the given primitive should contain the point.
Returns
Success or failure. Failure means the given point does not have a corresponding uv location in the given primitive.
Examples ¶
Evaluate the subdivision surface limit position and partial derivatives at each point on the poly cage and set the evaluation data as attributes at the given point number.
int prims[] = pointprims(file, ptnum); if (len(prims)) { int primnum = prims[0]; float prim_u, prim_v; if (pointprimuv(file, ptnum, primnum, prim_u, prim_v)) { int patch_id; float patch_u, patch_v; osd_lookuppatch(file, primnum, prim_u, prim_v, patch_id, patch_u, patch_v); vector P, du, dv, duu, duv, dvv; if (osd_limit(file, "P", patch_id, patch_u, patch_v, P, du, dv, duu, duv, dvv)) { setpointattrib(file, "P", ptnum, P); setpointattrib(file, "du", ptnum, du); setpointattrib(file, "dv", ptnum, dv); setpointattrib(file, "duu", ptnum, duu); setpointattrib(file, "duv", ptnum, duv); setpointattrib(file, "dvv", ptnum, dvv); } } }
See also | |
point |
|
prim |
|