How to switch between background modes


#1

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.

/Thomas


#2
viewport.EnableSolidBackgroundColorMode <bool>
viewport.IsSolidBackgroundColorMode()

see more information in the mxs help


#3

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!

/Thomas