This is the new script for max with many improovements for brazil and mentalray(max2008) users.A Big thanks goes to ZeBoxx for pushing the borders and helping to fix many many bugs!!!

Code:

changelog:
0.93
added two vrayoptions to use native objects like vraylight or vrayhdrimap,
added mr reflectionsphere,
some codechanges to access the bitmaps more generic:
BGbitmaptexture = a,
Enviromentbitmaptexture = b,
Reflectionbitmaptexture = c
0.92.1 b2:
added option to use the 'sIBL-REFmap' for the Environment when using a Dome Light (see "-- ZB 2008/Jan/01" for details)
0.92
codelayout changed and changing variables with "sdr" in it to "sIBL"
experimental MR support ...you have to switch to MR_physical_exposure_control before running the script
-- rewritten code layout for much easier implementating different renderes--
0.91b2
added Brazil r/s v2 support and fixed several bugs.
See comments starting with "-- ZB 2007/Dec/29" for details.