selarray = selection as array for d=1 to scenematerials.count do ( mat=scenematerials[d] orginalbump = mat.texmap_bump orginaldisplace = mat.texmap_displacement newmat = vraymtl() newmat.name = mat.name + "_converted" newmat.texmap_bump = orginalbump newmat.texmap_displacement = orginaldisplace for i=1 to selarray.count do ( if mat == selarray[i].material do ( selarray[i].material = newmat ) ) )