Hello every one, I hope it is okey to post topics about MAXScripts here.
I’m trying to quickly change the background colour of my viewport to black through the Listener. I type:
setVPortBGColor(color 0 0 0)
and I get this output:
(color 0 0 0)
But still, the viewport is grey, nothing happens.
Any suggestions on how to fix this? What I’m trying to create in the end is a simple UI icon that toggles between grey (standard) and black viewport colour.
This is my first MAXScript ever! Its function is very straight forward; it allows you to quickly toggle between the standard grey and pitch black colour of all the viewports.
The black viewport makes it easier to see particles when working with Particle Flow and the standard grey is my prefered option when working with other stuff. So this is simply an easy way to toggle back and forth between workflow.
Here’s the final code that got it to work for me:
CurrentColor = (GetUIColor 41*255) as color
if CurrentColor != color 0 0 0 then
(
SetUIColor 41 (color 0 0 0)
colorMan.repaintUI #repaintAll
)
else
(
SetUIColor 41 (color 131 131 131)
colorMan.repaintUI #repaintAll
)
Yes, I saw that and I tried my best from what I red there before posting here. But I didn’t get a hang of it until you pointed out what I was suppose to look for, thanks!