Wednesday, October 31, 2012

Set up a DayLight system

macroScript dayLightScript
buttontext: "DayLight"
Category: "ChippedTooth"
internalCategory:"ChippedTooth"
Tooltip:"Sets up a DayLight System"
(
IDisplayGamma.colorCorrectionMode = #gamma --enable Gamma
IDisplayGamma.gamma = 2.2 --set the Gamma to 2.2
IDisplayGamma.affectColorPickers = true -- ticks the Affect Color Selectors
IDisplayGamma.affectMEdit = true -- ticks the Affect Material Editor
-------------------------------------------------------------------------------------------------------
-- resetMaxFile #noPrompt -- use this if the one underneath this one sucks just remove the two -- at the start of this line!! no others
if checkForSave() do resetMaxFile() --This is optional it will reset max, but it will give you the chance to save first. To remove this line put two dashes in front.
renderers.current = mental_ray_renderer() --This sets your renderer to MR
-------------------------------------------------------------------------------------------------------
for i = 1 to 24 do -- This sets all the materials to Arch and Design and puts a random colour in the diffuse slot
(
setMEditMaterial i (Arch___Design__mi ())
meditMaterials[i].diff_color = random black white
)
-------------------------------------------------------------------------------------------------------
theInt = DaylightSystemFactory2.Create sunClass:mr_Sun skyClass:mr_Sky --This creates the DayLight system and sets the mrSun and mrSky
-------------------------------------------------------------------------------------------------------
mrEC = mr_Photographic_Exposure_Control () --Sets thedropdown to the mr_Photographic_Exposure_Control in exposure control
SceneExposureControl.exposureControl = mrEC -- assign to a variable
mrEC.active = true -- tick the Active box
mrEC.exposure_mode = 0 -- set the exposure (EV) radio button
mrEC.exposure_value = 15 -- set the spinner to 15
-------------------------------------------------------------------------------------------------------
Loc = $Daylight001.controller -- set the lat and long and orbital scale
Loc.latitude = 35.23
Loc.longitude  = -80.85
Loc.orbital_scale = 80
)

No comments:

Post a Comment