Search Maya Zest



Friday, September 1, 2017

MEL Code to change filter type of all your images/textures (MAYA)

Sometimes you might want to turn of the texture filtering for ALL textures or ALL SELECTED textures in your maya project. This is because the default filtering method (quadratic) can lead to very soft or smudgy textures.

Paste one of these scripts into your script editor with MEL selected. Then highlight the code snippet and press the play button to execute.





// Sets filter type to "Off" on ALL file textures

string $fileList[] = `ls -type "file"`;
for ($file in $fileList){
       
        setAttr ($file + ".filterType") 0;
             
}




// Sets filter type to "Off" on selected file textures

string $fileList[] = `ls -sl -type "file"`;

for ($file in $fileList){
       
        setAttr ($file + ".filterType") 0;
             
}