Since | 21.0 |
int usd_bindmaterial(int stagehandle, string primpath, string materialpath)
This function assigns the given material to the given primitive.
stagehandle
A handle to the stage to write to. Currently the only valid value is 0
, which means the current stage in a node. (This argument may be used in the future to allow writing to other stages.)
primpath
The path to the primitive.
materialpath
The path of the material primitive to assign.
Returns
The value of stagehandle
on success or -1
on failure.
Examples ¶
// Assigns a metal material to the sphere geometry. usd_bindmaterial(0, "/geo/sphere", "/materials/metal");
usd | |
usd_material | |
usd_prim |
|