Hi.
I 90% of the time name my maps in the diffuse slots with 'texmatnamehere_diffuse.ext'
I've wrote a script below which collects the scene materials and then collects the mats with only '_diffuse' in the filename and then shows them map/s in each associated material (it works with submats BTW).
I just would like any suggestions or help with the following please such as:
1. Is it easy to read a bitmap for colored values and then show texmap in the viewport and possibly ignore values like in normal maps and grey-scale obviously
2. Or just general scripting knowledge to help make the code/script better.
Thanks..
theMats = for i in scenematerials collect i
theMaps = getClassInstances bitmapTexture
thePattern = "*" + "diff" + "*"
theDiffuseMaps = for i in theMaps where matchpattern i.filename pattern:thePattern ignoreCase:false == true collect i
for o in theMats do (
-- enableHardwareMaterial o theMaps[5] true
for i = 1 to theDiffuseMaps.count do try(showHWTextureMap o theDiffuseMaps[i] true)catch()
for i = 1 to theDiffuseMaps.count do try(showTextureMap o theDiffuseMaps[i] true)catch()
)
By 3dwannab · 2016-03-01