for each in selection where classof each == VRayLight do
(
each.invisible = on
each.lightDistribution = 1 --directionality
each.size1 = 10 --half width
each.multiplier = 20
each.affect_diffuse = off
each.affect_specualr = off
each.affect_reflections = off
each.color_mode = 1 --temperature
each.color = color 251.15 252.763 255 --temp color
each.color_temperature = 6630.65 --temp value
)
You’re right it can be done relatively easily with maxscript especially if you don’t need a floating window with a UI.
Have a look at the code below. It will change four properties of any V-Ray lights selected (half-width, mode, invisible and units). You can add more lines between the parentheses to change more properties at once.```
(
for vrLight in selection where isKindOf vrLight vrayLight do
(
vrLight.size1 = 0.5 --Half-width
vrLight.color_mode = 1 --Mode
vrLight.invisible = true --Invisible
vrLight.normalizeColor = 0 --Units (0 for Default, 1 for Luminous Power, 2 for Luminance)
)
)
Here is a complete list of all the properties that can be changed this way. With some it's obvious which property they relate to, others might require a bit of trial and error.```
on : boolean
.type : integer
.targeted : boolean
.target_distance : worldUnits
.color_mode : integer
.color_temperature : float
.color : RGB color
.multiplier : float
.normalizeColor : integer
.size0 : worldUnits
.size1 : worldUnits
.size2 : worldUnits
.castShadows : boolean
.doubleSided : boolean
.invisible : boolean
.affect_diffuse : boolean
.diffuse_contribution : float
.affect_specualr (affect_specular) : boolean
.specular_contribution : float
.affect_reflections : boolean
.ignoreNormals : boolean
.noDecay : boolean
.storeWithIrradMap : boolean
.skylightPortal : boolean
.simplePortal : boolean
.subdivs : integer
.shadowBias : worldUnits
.cutoffThreshold : float
.notUsed : integer
.notUsed : integer
.smoothSurfaceShadows : boolean
.texmap : texturemap
.texmap_on : boolean
.texmap_resolution : integer
.texmap_adaptiveness : float
.texmap_locktodome (Lock_texmap_to_dome_orientation) : integer
.dome_emitRadius : worldUnits
.dome_targetRadius : worldUnits
.dome_spherical : boolean
.dome_affect_alpha (Affect_alpha) : boolean
.dome_rayDistanceMode : integer
.dome_rayDistance : worldUnits
.dome_visibleOriginal : integer
.mesh_source : node
.mesh_replaceOnPick : boolean
.mesh_flip : boolean
.lightDistribution : float
.preview_distribution (type) : integer
.preview_texmap (texmap_preview) : boolean
.use_mis : boolean
.enable_viewport_shading : boolean
.viewport_wire_color_on : boolean
.viewport_wire_color : RGB color
.icon_text : boolean
.excludeList : node array
.includeList : node array
.inclExclType : integer
There is also Mission Control (http://reformstudios.com/mission-control-for-3ds-max/)
Still in alpha, but workable. If you want to be able to access ALL parameters in ANY kind of object, light, material, etc. this is the next thing.