How to differenciate bump map / normal map in the bump slot
I am trying to convert a vray material into a standard material, and I have a problem to write this algorithm in MAXScript :
if (the bump map slot is not empty) do
(if (the slot contains a normal map) do (normal map goes to bump slot of the standard material)
else (bump map goes to bump slot of the standard material))
Probably I'm wrong, but the problem is that i don't know how to differentiate the 3 possible choices.
This is my actual code which is wrong :
for o in geometry do ( if classof o.material == VRayMtl do ( newmtl = Standardmaterial () if (o.material.texmap_bump != undefined) do ( if o.material.texmap_bump.normal_map.filename != undefined then ( newmtl.bumpMap.FileName = o.material.texmap_bump.normal_map.filename newmtl.bumpMapAmount = o.material.texmap_bump_multiplier ) else ( newmtl.bumpMap.FileName = o.material.texmap_bump.filename newmtl.bumpMapAmount = o.material.texmap_bump_multiplier ) ) o.material = newmtl ) )