Toggle Viewport Default Lighting in script

Hi,

I am trying to set the default viewport lighting to on or off and also set the 1 or 2 lights option but cannot seem to locate the correct method of doing it?

I thought it would be in the viewport class but nothing there? Does anybody know?

Cheers for your help.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
markbola's picture

cheers for the speedy

cheers for the speedy reply,

Ah that was recording the ctrl + L keystroke.

The problem with this is I do not have the current state of the default lighting. I need to parse multiple files with snapshots of objects with .fx materials on them. .fx materials do not render so a viewport snapshot is done instead. My main issue is that all the files have multiple light settings so that's the reason of needing to set the default lighting with 1 light only.

dimwalker's picture

Here is a command for

Here is a command for turnung on/off default viewport lighting:
max default lighting toggle
found it with macroRecorder 8)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.