on help pressed do messagebox "Light Include/Exclude\nThis utility allows you to assign objects to lights in the viewport,\nrather than by choosing a light and selecting an object from a list.\n\n Example:\n 1) Select some geometry.\n 2) Choose Include or Exclude.\n 3) Click the \"Assign to Light\" button.\n 4) Then click the light you want.\n\nThose objects are now Included or Excluded from that light.\n\nLight Properties:\nInside Light properties, you can see the Include/Exclude list\nof any light in the scene. When assigning geometry to a light,\nit displayes that light's list in the listbox.\n\nChoose Light:\nWill allow you to pick another light to view it's include list.\nClear Light:\nWill clear the currently selected light's include list." beep:false
on AssignToLight picked obj do
(
NA =0
objectname = obj.name
if ((classof obj) == miarealight) or ((classof obj) == miarealightomni) do