### this little script is to add the 'miLabel' attribute for
###amb_occlusion of objects with Mental Ray.
import maya.cmds as cmd
import string
sel = cmd.ls(sl=1)
for n in range (len(sel)):
attrs = cmd.listAttr(sel[n], k=1)
selString = string.join(attrs)
if ((string.find(selString, 'miLabel' )) == -1):
cmd.addAttr(sel[n], ln= "miLabel", at='long',min = -10, max= 10, dv= 1)
cmd.setAttr(sel[n]+'.miLabel',e=1, keyable=1)