Hi, I'm just trying to create a blinn material in which it has the attached 2D texture. I got some mel line but it seems like they are not connecting to the blinn material. Here is the command so far
string $myBlinn = `shadingNode -asShader blinn`;
hyperShade -assign $myBlinn;
string $selection[] = `ls -sl`;
defaultNavigation -createNew -destination ($selection[0]+".color");
createNewOverride(($selection[0]+".color"), true);
createRenderNode -allWithTexturesUp ($selection[0]+".color") "";
createRenderNodeCB -as2DTexture "" file ($selection[0]+".color");
shadingNode -asUtility place2dTexture;
Replies
hyperShade -assign $myBlinn;
Any error message you can post here?
source "AEfileTemplate"; string $mySel[] = `ls -sl`; string $myBlinn = `shadingNode -asShader blinn`; string $myFile = `createRenderNodeCB -as2DTexture "" file ("")`; setAttr ($myBlinn + ".specularRollOff")0.2; connectAttr ($myFile+".outColor") ($myBlinn+".color"); select $myFile; AEfileTextureBrowser ("AEassignTextureCB " + $myFile + ".fileTextureName") $myFile image; string $filePath = `getAttr ($myFile+".fileTextureName")`; if($filePath != "") { select $mySel; hyperShade -assign $myBlinn; }