How to switch between background modes


How do I switch between the background modes in Viewport Configuration->Background.

The modes are: “Synchronize with Display Mode”, “Use Customize User Interface Gradient Colors” and “Use Customize User Interface Solid Color” but I can’t find anything about them in the help files or google, so hopefully someone in here can help.


viewport.EnableSolidBackgroundColorMode <bool>

see more information in the mxs help


Thanks Denis.

Although it seems like it isn’t as simple as that, I think the new “Synchronize with Display Mode” feature is messing with it. When in shaded mode and setting “viewport.EnableSolidBackgroundColorMode true” then it switches to “Use environment background” which still doesn’t give me a normal background color (I have a very bright background color set in my environment, which is displayed now since max2020 I believe as it isn’t black) But if I set the viewport to wireframe first then it behave different, so in order for it to work I have to run:

viewport.SetRenderLevel #wireframe
viewport.EnableSolidBackgroundColorMode false
viewport.EnableSolidBackgroundColorMode true
viewport.SetRenderLevel #facethighlights

Which seems very weird, but works!