you probably need to source "AEfileTemplate" as that may get sourced somewhere else which is why it works the second time around. (C:\Program Files\Autodesk\Maya\scripts\AETemplates\AEfileTemplate.mel). Probably better to use filedialog or filebrowserdialog to do the UI for selecting a texture rather than dealing with mel…
Hi small error came I restarted maya and run this new script it does something (Didn't assign the material to the selected object as I expected ) But again when I run this command it worked perfectly why? string $mySel[] = `ls -sl`;string $myBlinn = `shadingNode -asShader blinn`;string $myFile = `createRenderNodeCB…