viewport background toggle
I used to have on my work machine a usefull little script that allows to toggle the background color of the viewport. Say to capture the viewport in order to print it, I used to switch between Black for work and White to save and print. Does anyone remember where this script can be found? Thanks.
Comments
Thanks a lot guys! Change
Thanks a lot guys! Change the viewport background color is the one so when I grab the viewport image to print, white background save my ink!
:)
"Will scan for food"
I find that in your code
I find that in your code missed color conversion. Its added only to color property of colorpicker. And i think is good to know, so there you go ...
-----------
finally i rewrite my code and upload it here:
http://www.scriptspot.com/3ds-max/swap-background-color
-----------
my recent MAXScripts RSS (archive here)
Ops.., then Jrulier look for
Ops.., then Jrulier look for this script:
http://www.scriptspot.com/3ds-max/sergos-script-pack
It use setVPortBGColor() function.
There is snippet code then:
or in my utility can replace cases with
-- P.S. colorMan used some diferent color matrix, for example:
and this conversion "(color ((GetUIColor 41).x*255) ((GetUIColor 41).y*255) ((GetUIColor 41).z*255))" return unexpected colors, and change default color (color 125 125 125) to (color 175 175 175).
my recent MAXScripts RSS (archive here)
I think he needs to change
I think he needs to change the viewport background color, not the scene background. If that is the case, the code could be modified as such:
rollout swapBgrColor "Swap background color"
(
fn setBckgroundColor theColor =
(
SetUIColor 41 theColor
colorMan.repaintUI #repaintAll
)
radiobuttons rb_clr labels:#("1 ", "2 ", "3 ") columns:3
colorpicker cp_clr1 "" color:[0,0,0] across:3
colorpicker cp_clr2 "" color:[255,255,255]
colorpicker cp_clr3 "" color:(color ((GetUIColor 41).x*255) ((GetUIColor 41).y*255) ((GetUIColor 41).z*255))
button btn_bgrCrl "Set background Color" width:140
on btn_bgrCrl pressed do
(
case rb_clr.state of
(
1: setBckgroundColor cp_clr1.color
2: setBckgroundColor cp_clr2.color
3: setBckgroundColor cp_clr3.color
)
)
)
createDialog swapBgrColor
I hope this help utility
I hope this help
my recent MAXScripts RSS (archive here)