//---------------------------------------------------------------------------------------------- // // switch texture resolution // // SCRIPT: icSwitchTexRes.mel // // AUTHOR: Ingo Clemens // DATE: July 3, 2004 // // DESCRIPTION: Makes it easy to switch between two resolutions of a material. // Just have two versions of all necessary textures available in the // appropriate folders ('../sourceimages/lores/' and '../sourceimages/hires/'). // If the folders don't exist they will be created automatically. // If the textures are not explicitly hires or lores textures and still reside // in the "sourceimages" directory they will be interpreted as hires textures. // If a material/shader uses both hires and lores textures the user will get // warned. // Usually texture nodes don't share the same name with the texture file by // default. In this case an asterisk will appear along with the name. Texture // nodes can then be set to share the same name with the texture files. // The "Get from Selection"-button shows the material from the selected object // in the list. // // VERSIONS: // 2.3 - Jul. 29, 2005 // - made the global variables more unique by their names // // 2.2 - Nov. 17 2004 // - Fixed the script regarding displacement nodes which are not connected // to the shader but the shading-group node. // - Fixed the problem with double connections, i.e. when connecting a // psdFileTex to the color channel the transparency channel gets connected too // - optimized the code when searching the shader tree // // 2.1 - Nov. 14 2004 // - The script will now also work with subdirectories in the sourceimages, // lores and hires folders // // 2.0 - Nov. 13 2004 // - Fixed the bug that only texture nodes that directly feed into the shader // will get changed; other nodes were omitted and thus the script didn't // function properly. // - Fixed that after renaming the material gets properly listed. // - "Get from Selection" also works now with the default lambert material // //----------------------------------------------------------------------------------------------