// The code below will create and assign // a shader with an attached file node to // an object. // create the file node and shader string $file = `createNode file`; string $shader = `createNode lambert`; // connect the nodes connectAttr ($file+".outColor") ($shader+".color"); // insert the image path in the file node string $roadMap = "D:/roadmap.jpg"; setAttr -type "string" ($file+".fileTextureName") $roadMap; // assign the shader to an object string $object[] = `nurbsPlane -name "nurbsPlane1"`; select -r $object[0]; hyperShade -assign $shader;