Converting VRay material to architectural material
I need to make a script that will convert the VRay materials name either "7a" or "Mirror" to architectural mirror material. It's easy to do that if the material is in the material editor:
meditMaterials[9] = Architectural ()
meditMaterials[9].template = "Mirror"
meditMaterials[9].Diffuse = color 255 255 255
But the material is never in the material editor when I run the script, so I would need the script to look for materials named either "7a" or "Mirror" in the scene's materials and convert these. Only part I'm missing is the searching materials by name, after that it'll be easy, I already did a script that would convert every material in the material editor to standard material with the values I wanted so I will just start with that.
So would anyone know how to find and modify materials that are not in the material editor by searching them by name?
Thank you!
Comments
search_array=#("7a","Mirror")
search_array=#("7a","Mirror")
for mat in scenematerials where (finditem search_array mat.name != 0) do
(
stuff
)
Thanks a lot Jon! I'll try
Thanks a lot Jon! I'll try that as soon as I get some free time to update the script!
Anyone would be able to help
Anyone would be able to help me with that?