MoonDoggie
04-19-2007, 09:04 PM
Friends and family,
I'm writing a script that automatically relinks bitmaps for missing textures right inside the materials instead of through the Max auto-paths dialog which when you have many network drives can get slow. The script is about done, now just the code to relink the textures exactly.
What I am having it do is search for the missing texture "Giraffe.jpg" and when it finds that texture in a directory automatically sets the obj.material.diffuseMap.filename = the path it found for a new "Giraffe.jpg" texture.
The problem is complex shader networks like missing bitmaps inside of falloff maps/noise maps etc. How can I account for all of the possibilities when trying to relink the bitmap?
If in the diffuse slot there is a falloff map, and in the color1 slot of the falloff map there is a missing bitmap texture etc.
Needless to say there is going to be alot of try/catching going on. Perhaps someone could shed some light on this for me? I'll be making the script public once it's done.
Many Thanks,
-Colin
I'm writing a script that automatically relinks bitmaps for missing textures right inside the materials instead of through the Max auto-paths dialog which when you have many network drives can get slow. The script is about done, now just the code to relink the textures exactly.
What I am having it do is search for the missing texture "Giraffe.jpg" and when it finds that texture in a directory automatically sets the obj.material.diffuseMap.filename = the path it found for a new "Giraffe.jpg" texture.
The problem is complex shader networks like missing bitmaps inside of falloff maps/noise maps etc. How can I account for all of the possibilities when trying to relink the bitmap?
If in the diffuse slot there is a falloff map, and in the color1 slot of the falloff map there is a missing bitmap texture etc.
Needless to say there is going to be alot of try/catching going on. Perhaps someone could shed some light on this for me? I'll be making the script public once it's done.
Many Thanks,
-Colin
