Need help replacing some maps in my scene.
Hi I'm a new at using MAXScript, and I need to replace a lot of Normal Bump maps in my scene. I imported some models and they have a Multimaterial with several VrayMtl on them, and in some of those VrayMtls there is a Normal Bump map which I need to replace with a VrayNormalMap with the same Bitmap as before.
I searched the forums and someone had a similar problem (actually was the exact opposite), and I found a script that replaces VrayNormalMap with a Normal Bump map, so I tryed to tweak it to do the inverse, but I can't seem to make it work. I believe I need to specify that it is inside a multimaterial, and then a VrayMtl submaterial, but now I'm totally lost.
Any help would be really aprecciated.
This is the script I found earlier from barigazy:
try(destroydialog ::vrnRoll) catch() rollout vrnRoll " VrayNormalMap Convertor" width:168 height:30 ( fn filterNMap obj = ( isKindOf obj.material VRayMtl and \ isKindOf obj.material.texmap_bump VRayNormalMap and \ isKindOf obj.material.texmap_bump.normal_map Bitmaptex and \ obj.material.texmap_bump.normal_map.filename != undefined ) button btn "VrayNormalMap to NormalMap" on btn pressed do ( if (getClassInstances VRayNormalMap).count != 0 do ( local objMtlsArr = for g in geometry where filterNMap g collect g.material if objMtlsArr.count != 0 do ( for m in objMtlsArr do ( local NMap = Normal_Bump name:(m.texmap_bump.name) normal_map:(m.texmap_bump.normal_map) m.texmap_bump = NMap ) free objMtlsArr ) ) ) ) createDialog vrnRoll style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)