|
Hi,
Now, here is script I have so far:
$folder="/Users/fredeno4/Desktop/Maps";
$material="blinn1";
$texture=`shadingNode -asTexture file`;//create file
connectAttr -force ($texture+".outColor") ($material+".color")// assign the file the the material
$files=`getFileList -folder $folder`;// get all file list in the folder inclode thumbs and everything
for( $i = 0; $i < size( $files ) ; $i++ )
{
$files[$i]=$folder+$files[$i];// get each file full directory and name
setAttr -type “string” ($texture+".fileTextureName") $files[$i];// assign the file to the texture node
renderIntoNewWindow render;// render view
renderWindowMenuCommand keepImageInRenderView renderView;// save the result in images/temp
}
It does create a new texture and connects it to a blinn that I need, but it does not load any of the maps from the “Maps” folder on the desktop. Therefore it renders the object black after 4 passes, and stops. Here is error message it gives:
// Warning: Texture file /Users/fredeno4/Desktop/Mapstwosixth_120cc.tif doesn’t exist, node file1 //
For some reason it looks for the Map which is named “Mapstwosixth_120cc.tif” although it should look for “twosixth_120cc.tif” file in the “Map” folder. ANd after that for the next file in the Map folder, etc.
Can someone help me with that correction?
Thanks,
Fred
|