Notifications
Clear all

[Closed] switching to "default lighting" mode

Hi,

I can’t find a way to do so via maxscript

actually I found a way to toggle this mode with a “max command”:

max default lighting toggle

but since I haven’t found a way to know in which mode I currently am I can’t really use it.
So anyone knows?
thanks!

Paul.

4 Replies

This is all I found through the listener, but I couldn’t find out what state I was in via maxscript

actionMan.executeAction -844228238 "7"  -- Viewport Lighting and Shadows: Illuminate with Default Lights
actionMan.executeAction -844228238 "6"  -- Viewport Lighting and Shadows: Illuminate with Scene Lights
actionMan.executeAction -844228238 "4"  -- Viewport Lighting and Shadows: Configure Lighting and Shadows

Thanks a lot Luke, that should really help.
Actually I’m working on a “preview maker” script and some co-workers asked me to add this function since “scene lights” mode can be confusing. As I have to restore parameters after the preview is done it could have been nice to know in which mode the scene is before launching a preview, but that’s not very important.
thanks,
Paul.

I’m trying to do this too and havent found anything on the net so far to find the states.

 -- PRE-Render script
lights.enabled=off
#($DefaultFillLight,$DefaultKeyLight).enabled=on
 
-- POST-Render script
lights.enabled=on
#($DefaultFillLight,$DefaultKeyLight).enabled=off