changing Viewport Background with colorMan.

changing Viewport Background with colorMan.

roberto.gagliano
Contributor Contributor
2,855 Views
19 Replies
Message 1 of 20

changing Viewport Background with colorMan.

roberto.gagliano
Contributor
Contributor

Hi all,

in earlier Versions of Max i used the workflow below to generate 3 buttons which let me change the viewport background color with one click:

- customize UI ... colors ... change viewport background ... click "apply colors" ... save as "white.clrx", "black.clrx", "grey54.clrx
- copy all clrx-files to:
C:\Program Files\Autodesk\3ds Max xxxx\en-US\UI
- open scripting listener
- paste the following line: colorMan.loadColorFile "black.clrx"
- select the whole text and drag it to a toolbar, do the same with: colorMan.loadColorFile "black.clrx" and "grey54.clrx

 

In 3ds max 2023 this no longer works. Clicking the button produces the attached Macro Script Error Exception.

Unfortunately I have no scripting skills, any help would be appreciated.

 

thanks in advance

 

0 Likes
Accepted solutions (4)
2,856 Views
19 Replies
Replies (19)
Message 2 of 20

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

use one of the four block to make a macro:

/**************** BLACK *******************/
(
	backgroundColor = black
	viewport.EnableSolidBackgroundColorMode on
	s = NitrousGraphicsManager.GetActiveViewportSetting()
	s.UseEnvironmentBackgroundColorEnabled = on
	InvalidateAllBackgrounds()
)

/**************** GRAY ********************/
(
	backgroundColor = gray 
	-- for dim gray use: backgroundColor = (color 54 54 54)
	
	viewport.EnableSolidBackgroundColorMode on
	s = NitrousGraphicsManager.GetActiveViewportSetting()
	s.UseEnvironmentBackgroundColorEnabled = on
	InvalidateAllBackgrounds()
)


/**************** WHITE *******************/
(
	backgroundColor = white
	-- for lite gray use: backgroundColor = (color 200 200 200)

	viewport.EnableSolidBackgroundColorMode on
	s = NitrousGraphicsManager.GetActiveViewportSetting()
	s.UseEnvironmentBackgroundColorEnabled = on
	InvalidateAllBackgrounds()
)


/**************** GRADIENT ****************/
(
	backgroundColor = black
	viewport.EnableSolidBackgroundColorMode off
	s = NitrousGraphicsManager.GetActiveViewportSetting()
	s.UseEnvironmentBackgroundColorEnabled = off
	InvalidateAllBackgrounds()
)
0 Likes
Message 3 of 20

roberto.gagliano
Contributor
Contributor

Hi Denis,

thanks a lot for the quick help!

It works - but with one limitation:

When launching the macro, the Background color only changes in the perspective view, even if another vieport is active. Even if i maximize one of the other viewports and run the macro, the BG color is changed in the (now invisible) perspective view. If i set the perspective to a camera or to top view the macro still shows the same behaviour.

Am I missing something?

The old macro changed the color in all viewports at once. Basically, changing each viewport separetely would be handy as this way it would be more flexible. But it should be able to adress any viewport, not only the perspective view.

0 Likes
Message 4 of 20

denisT.MaxDoctor
Advisor
Advisor
/**************** WHITE *******************/
(
	backgroundColor = white
	id = viewport.activeViewportID 
	for k=1 to viewport.numViewEx() do
	(
		viewport.activeViewportEx k
		viewport.EnableSolidBackgroundColorMode on
		s = NitrousGraphicsManager.GetActiveViewportSetting()
		s.UseEnvironmentBackgroundColorEnabled = on
	)
	viewport.activeViewportID = id
	InvalidateAllBackgrounds()
)


/**************** GRADIENT ****************/
(
	backgroundColor = black
	id = viewport.activeViewportID 
	for k=1 to viewport.numViews do
	(
		viewport.activeViewport = k
		viewport.EnableSolidBackgroundColorMode off
		s = NitrousGraphicsManager.GetActiveViewportSetting()
		s.UseEnvironmentBackgroundColorEnabled = off
	)
	viewport.activeViewportID = id
	InvalidateAllBackgrounds()
)

 

example made for white... how to put a different color, I hope you can guess yourself.

0 Likes
Message 5 of 20

roberto.gagliano
Contributor
Contributor

thanks again,

i fiddled around a little yesterday and found out that it has to do with gradient BG in the template file. If the file contains a VP with gradient, only this VP accepts the color change. Then, if i activate any other VP and click the gradient button (with your script), nothing changes in this view at first, but from now on this viewport and the first one (with the initial gradient) accept all the changes at the same time when hitting one of the color buttons. So i first have to set all the viewports to this "invisible" gradient to make the synchronally change color.

the "gradient" script from here on also works but only for the active viewport but at the same time changes the other viewports to black.

if i open up a file without gradient VP (like most of my existing files), the script works as expected.

all this is for your old script, the new one acts similar, but i could not yet find out the "system" behind it.

Anyhow, thanks a lot for yout help! Yout first script is fine for me ...

0 Likes
Message 6 of 20

denisT.MaxDoctor
Advisor
Advisor
Accepted solution
struct VPT_BackgroundConfig
(
/*
Apply Button ID:
	0: OK
	1: Cancel
	2: Apply to Active View
	3: Apply to All Views in Active Layout Tab

Background Mode ID:	
	0: Synchronize with Display Mode
	1: Use Customize User Interface Gradient Colors
	2: Use Customize User Interface Solid Color 
	3: Use Environment Background
	4: Use Files
*/

	debug = off,
	apply = on,
		
	modeID = 0,
	buttID = 1,
	solidColor = black,
	
	fn preferenceCallback debug:off = 
	(
		hwnd = DialogMonitorOPS.GetWindowHandle()
		
		if (UIAccessor.GetWindowText hwnd) == "Viewport Configuration" do 
		(	
			if debug do format "modeID:% buttID:% color:%\n" modeID buttID solidColor
			
			if iskindof solidColor Color do backgroundColor = solidColor
			back_hwnd = UIAccessor.GetFirstChildWindow hwnd
			mode_hwnd = UIAccessor.GetFirstChildWindow back_hwnd
			for k = 0 to 4 do
			(
				if debug do format "vpmode % >> hwnd:%\t> %\n" k mode_hwnd (UIAccessor.GetWindowText mode_hwnd)
				
				if modeID == k do UIAccessor.PressButton mode_hwnd
				mode_hwnd = UIAccessor.GetNextWindow mode_hwnd
			)
			
			butt_hwnd = UIAccessor.GetNextWindow back_hwnd
			for k = 0 to 3 do
			(
				if debug do format "button % >> hwnd:%\t> %\n" k butt_hwnd (UIAccessor.GetWindowText butt_hwnd)
				
				if buttID == k do UIAccessor.PressButton butt_hwnd
				butt_hwnd = UIAccessor.GetNextWindow butt_hwnd
			)
			UIAccessor.SendMessageID hwnd (if apply then #IDOK else #IDCANCEL)
		)
		true
	),
	
	fn setupBackground mode: action: color: =
	(
		if mode != unsupplied do modeID = case mode of 
		(
			    #sync: 0
			#gradient: 1
			   #solid: 2
		 #environment: 3
			    #file: 4
		     #default: 0
		)
		
		if action != unsupplied do buttID = case action of
		(
			    #ok: 0
			#cancel: 1
			 #actve: 2
			   #all: 3
			default: 1
		)
		
		if color != unsupplied do solidColor = color
		
		local enabled = DialogMonitorOPS.Enabled
		DialogMonitorOPS.RegisterNotification this.preferenceCallback id:#vptBackgroundConfig
		DialogMonitorOPS.Enabled = true	
		max vptconfig
		DialogMonitorOPS.unRegisterNotification id:#vptBackgroundConfig
		DialogMonitorOPS.Enabled = enabled
		ok
	)
)

/*

global _bcfg = VPT_BackgroundConfig()


--> ACTIVE VIEW GREEN:
_bcfg.setupBackground mode:#environment action:#active color:green


--> ALL VIEWS ORANGE:
_bcfg.setupBackground mode:#environment action:#all color:orange


--> ALL VIEWS GRAIENT:
_bcfg.setupBackground mode:#gradient action:#all

*/

 

 

Reloading a color file (*.clrx) during a MAX session is generally not recommended. When you upload the clrx file, you are reloading ALL color settings for the MAX UI. Some tools use their own custom colors and apply them to custom UI elements. You can't know those colors, so you overwrite them with some default values. For some of my old tools, I used custom colors, but now I use a different mechanism for this because some developers have overwritten my settings with inept use of clrx files.

0 Likes
Message 7 of 20

denisT.MaxDoctor
Advisor
Advisor

@roberto.gagliano wrote:

 

In 3ds max 2023 this no longer works. Clicking the button produces the attached Macro Script Error Exception.

 


the attached error exception says that the macro has a syntax error, namely "lower quotes" at the beginning of the filename. (,,filename''). Such "localization" is not allowed by the MaxScript syntax.

0 Likes
Message 8 of 20

roberto.gagliano
Contributor
Contributor

thanks a lot again!

this seems very comprehensive ... will take me some time to check it out

 

0 Likes
Message 9 of 20

roberto.gagliano
Contributor
Contributor
the attached error exception says that the macro has a syntax error, namely "lower quotes" at the beginning of the filename. (,,filename''). Such "localization" is not allowed by the MaxScript syntax.

i remember having this before and writing me a note about this.
i paid extra attention to paste it the correct way, but seems there has been some "hidden conversion"
0 Likes
Message 10 of 20

roberto.gagliano
Contributor
Contributor

hello denisT.MaxDoctor,
i´ve been using your script from Message #4 from ‎11-21-2022 10:43 AM for some days.
Changing the Viewport Background Color simultaneously changes the Render Environment´s Background Color, which is not conveniant as it also affects the "Default Shading" behaviour of viewports set to "High Quality".
Using my old colorMan-scripts does not do so.
I could not yet figure out how to use your advanced script from Message #6 from ‎11-22-2022 10:45 AM.
Does it show same same behaviour regarding Render Environment settings?

0 Likes
Message 11 of 20

denisT.MaxDoctor
Advisor
Advisor

@roberto.gagliano wrote:


I could not yet figure out how to use your advanced script from Message #6


 

 

 

 

global VPT_BackgroundConfig 
(
	struct _vpt_backgroundconfig
	(
		modeID = 0,
		buttID = 1,
		solidColor = black,
		
		fn preferenceCallback apply:on = 
		(
			--format "modeID:% buttID:% color:%\n" modeID buttID solidColor
			
			hwnd = DialogMonitorOPS.GetWindowHandle()
			title = uiaccessor.GetWindowText hwnd
			
			--format "hwnd:% text:%\n" hwnd title
			
			if iskindof title String and matchpattern title pattern:"Viewport*Configuration" do 
			(	
				local TCM_SETCURFOCUS = 0x1330
				local backgroundTabIndex = 1
				
				children = uiaccessor.GetChildWindows hwnd
				for child in children do 
				(
					if ((uiaccessor.GetWindowClassName child) == "SysTabControl32") do
					(
						exit with (uiaccessor.SendMessage child TCM_SETCURFOCUS backgroundTabIndex 0)
					)
				)

				if iskindof solidColor Color do backgroundColor = solidColor

				back_hwnd = (windows.getChildHWND hwnd "Viewport Background")[1]
				mode_hwnd = uiaccessor.GetFirstChildWindow back_hwnd
				for k = 0 to 4 do
				(
					--format "vpmode % >> hwnd:%\t> %\n" k mode_hwnd (UIAccessor.GetWindowText mode_hwnd)
					if modeID == k do 
					(
						exit with (uiaccessor.PressButton mode_hwnd)
					)
					mode_hwnd = uiaccessor.GetNextWindow mode_hwnd
				)
				
				butt_hwnd = (windows.getChildHWND hwnd "OK")[1]
				for k = 0 to 3 do
				(
					--format "button % >> hwnd:%\t> %\n" k butt_hwnd (UIAccessor.GetWindowText butt_hwnd)
					if buttID == k do uiaccessor.PressButton butt_hwnd
					butt_hwnd = uiaccessor.GetNextWindow butt_hwnd
				)
				uiaccessor.SendMessageID hwnd (if apply then #IDOK else #IDCANCEL)
			)
			true
		),
		
		fn setupBackground mode: action: color: =
		(
			if mode != unsupplied do modeID = case mode of 
			(
				#gradient: 1
				  #custom: 2
			 #environment: 3
					#file: 4
				 #default: 0
			)
			
			if action != unsupplied do buttID = case action of
			(
					#ok: 0
				#cancel: 1
				#active: 2
				   #all: 3
				default: 1
			)
			
			if color != unsupplied do solidColor = color
			
			local enabled = DialogMonitorOPS.Enabled
			DialogMonitorOPS.RegisterNotification this.preferenceCallback id:#vptBackgroundConfig
			DialogMonitorOPS.Enabled = true	
			max vptconfig
			DialogMonitorOPS.unRegisterNotification id:#vptBackgroundConfig
			DialogMonitorOPS.Enabled = enabled --false
			ok
		),
		
		action_00 = 
		(
			macroScript VPT_SUPER_BLACK
				category:"with denisT"
				buttonText:"SUPER BLACK"
				toolTip:"View Background: SUPER BLACK (+SHIFT - ALL)"
				autoUndoEnabled:off
				silentErrors:off
			(
				local bcfg = undefined
				local bgcol = black
				local setts	= undefined	
				
				fn is_enabled = isstruct (bcfg = ::VPT_BackgroundConfig)
				fn v_settings = NitrousGraphicsManager.GetViewportSetting (if (i = viewport.activeViewportId) != undefined then i else -1) 
				
				on isEnabled do (is_enabled())
				on isChecked do (setts = v_settings()) != undefined and
				(
					setts.UseEnvironmentBackgroundColorEnabled and (backgroundColor == bgcol)
				)
				on execute do if is_enabled() do
				(
					act = if keyboard.shiftPressed then #all else #active
					bcfg.setupBackground mode:#environment action:act color:bgcol
				)
			)
		),
		action_01 = 
		(
			macroScript VPT_BLACK
				category:"with denisT"
				buttonText:"BLACK"
				toolTip:"View Background: BLACK (+SHIFT - ALL)"
				autoUndoEnabled:off
				silentErrors:off
			(
				local bcfg = undefined
				local bgcol = (color 1 1 1)
				local setts	= undefined	
				
				fn is_enabled = isstruct (bcfg = ::VPT_BackgroundConfig)
				fn v_settings = NitrousGraphicsManager.GetViewportSetting (if (i = viewport.activeViewportId) != undefined then i else -1) 
				
				on isEnabled do (is_enabled())
				on isChecked do (setts = v_settings()) != undefined and
				(
					setts.UseEnvironmentBackgroundColorEnabled and (backgroundColor == bgcol)
				)
				on execute do if is_enabled() do
				(
					act = if keyboard.shiftPressed then #all else #active
					bcfg.setupBackground mode:#environment action:act color:bgcol
				)
			)
		),
		action_02 = 
		(
			macroScript VPT_DARK_GRAY
				category:"with denisT"
				buttonText:"DARK GRAY"
				toolTip:"View Background: DARK GRAY (+SHIFT - ALL)"
				autoUndoEnabled:off
				silentErrors:off
			(
				local bcfg = undefined
				local bgcol = (color 32 32 32)
				local setts	= undefined	
				
				fn is_enabled = isstruct (bcfg = ::VPT_BackgroundConfig)
				fn v_settings = NitrousGraphicsManager.GetViewportSetting (if (i = viewport.activeViewportId) != undefined then i else -1) 
				
				on isEnabled do (is_enabled())
				on isChecked do (setts = v_settings()) != undefined and
				(
					setts.UseEnvironmentBackgroundColorEnabled and (backgroundColor == bgcol)
				)
				on execute do if is_enabled() do
				(
					act = if keyboard.shiftPressed then #all else #active
					bcfg.setupBackground mode:#environment action:act color:bgcol
				)
			)
		),
		action_03 = 
		(
			macroScript VPT_CUSTOM
				category:"with denisT"
				buttonText:"CUSTOM"
				toolTip:"View Background: CUSTOM (+SHIFT - ALL)"
				autoUndoEnabled:off
				silentErrors:off
			(
				local bcfg = undefined
				fn is_enabled = isstruct (bcfg = ::VPT_BackgroundConfig)
				
				on isEnabled do (is_enabled())
				on execute do if is_enabled() do
				(
					act = if keyboard.shiftPressed then #all else #active
					bcfg.setupBackground mode:#custom action:act
				)
			)
		),
		action_04 = 
		(
			macroScript VPT_DEFAULT
				category:"with denisT"
				buttonText:"DEFAULT"
				toolTip:"View Background: DEFAULT (+SHIFT - ALL)"
				autoUndoEnabled:off
				silentErrors:off
			(
				local bcfg = undefined
				fn is_enabled = isstruct (bcfg = ::VPT_BackgroundConfig)
				
				on isEnabled do (is_enabled())
				on execute do if is_enabled() do
				(
					act = if keyboard.shiftPressed then #all else #active
					bcfg.setupBackground mode:#default action:act
				)
			)
		),
		action_05 = 
		(
			macroScript VPT_GRADIENT
				category:"with denisT"
				buttonText:"GRADIENT"
				toolTip:"View Background: GRADIENT (+SHIFT - ALL)"
				autoUndoEnabled:off
				silentErrors:off
			(
				local bcfg = undefined
				fn is_enabled = isstruct (bcfg = ::VPT_BackgroundConfig)
				
				on isEnabled do (is_enabled())
				on execute do if is_enabled() do
				(
					act = if keyboard.shiftPressed then #all else #active
					bcfg.setupBackground mode:#gradient action:act
				)
			)
		),
		
		/* -- Solid Color Template
		action_<index> = 
		(
			macroScript VPT_<COLOR_NAME>
				category:"with denisT"
				buttonText:"<COLOR_NAME>"
				toolTip:"View Background: <COLOR_NAME> (+SHIFT - ALL)"
				autoUndoEnabled:off
				silentErrors:off
			(
				local bcfg = undefined
				local bgcol = color <R> <G> <B> -- or color built-in name 
				local setts	= undefined	
				
				fn is_enabled = isstruct (bcfg = ::VPT_BackgroundConfig)
				fn v_settings = NitrousGraphicsManager.GetViewportSetting (if (i = viewport.activeViewportId) != undefined then i else -1) 
				
				on isEnabled do (is_enabled())
				on isChecked do (setts = v_settings()) != undefined and
				(
					setts.UseEnvironmentBackgroundColorEnabled and (backgroundColor == bgcol)
				)
				on execute do if is_enabled() do
				(
					act = if keyboard.shiftPressed then #all else #active
					bcfg.setupBackground mode:#environment action:act color:bgcol
				)
			)
		),		
		*/
		
		on create do
		(
			callbacks.removeScripts id:#VPT_BackgroundConfig
			callbacks.addScript #activeViewportChanged "updateToolbarButtons()" id:#VPT_BackgroundConfig
			
			updateToolbarButtons()
		)
	)
	
	VPT_BackgroundConfig = _vpt_backgroundconfig()
	ok
)

 

 

 

 

 

save this code in any MS file with a name that makes sense to you... for example: "vpt_background.ms"

and put in any autoload max directory...

let's do it:
...\Program Files\Autodesk\3ds Max ***\stdplugs\stdscripts\vpt_background.ms

 

after restarting MAX you will see in Customize User Interface -> Toolbars -> Category: with denisT
and several View Background items - BLACK, CUSTOM, DARK GRAY etc...


Names correspond to the code's macro actions.

If you make macro buttons, clicking the button sets the background for the active viewport by default to the specified state, but if you click with SHIFT it will do for ALL viewports.

 

If you need to add your own color - just add a new action to the code... (see "Solid Color Template" in the code above)

 

 

 

 

 

 

 

0 Likes
Message 12 of 20

roberto.gagliano
Contributor
Contributor

WOW!! Thanks for the Help and the comprehensive explanation.

I did everything according to your instructions.

 

Now, when clicking one of the buttons: the "Vieport configuration" dialog pops up, but nothing else happens, not even if i click "OK" on the dialog. Is this intentional? should there be some changes made in the dialog before confirming "OK".

 

thanks again for your patience with my unknowledgment!

0 Likes
Message 13 of 20

denisT.MaxDoctor
Advisor
Advisor

no... something is going wrong...

it has to open config dialog, set up the background mode, and close it...

 

take the latest code... and try again.

 

what MAX version do you use? 

0 Likes
Message 14 of 20

roberto.gagliano
Contributor
Contributor

i used your latest code (message #11 from ‎12-01-2022 07:49 PM)

Max-version is also the latest, downloaded and installed on 11-14-2022 (3ds Max 2023.2.2)

0 Likes
Message 15 of 20

denisT.MaxDoctor
Advisor
Advisor

@roberto.gagliano wrote:

i used your latest code (message #11 from ‎12-01-2022 07:49 PM)

Max-version is also the latest, downloaded and installed on 11-14-2022 (3ds Max 2023.2.2)


I updated message #11. The attached code now works in 3ds Max 2023.

0 Likes
Message 16 of 20

roberto.gagliano
Contributor
Contributor

I used your new code and also generated a "RED" button based on your template. The background now changes, but not as expected.

Is there a difference between the background set in the viewport configuration and the background set in the render environment? As i pointed out earlier, the render environment should not be changed.

I attached some screenshots to illustrate what happened:

The "SUPER BLACK" button works as expected. All the others switch the render environment which results in strange behaviour in shaded viewports using "High Quality" (and also in renderings, I suppose).

0 Likes
Message 17 of 20

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

I showed all possible ways to change the viewport background, but it seems that you need the simplest, although in my opinion the less useless. Here is the last attempt... There is no more ways to change background! 

 

/**************** CUSTOM GRADIENT (RED-YELLOW) ****************/
(
	viewport.EnableSolidBackgroundColorMode off

	colorMan.setColor #ViewportGradientBackgroundTop [0.1,0,0]
	colorMan.setColor #ViewportGradientBackgroundBottom  [0.1,0.1,0]

	s = NitrousGraphicsManager.GetActiveViewportSetting()
	s.UseEnvironmentBackgroundColorEnabled = off
	s.UseViewportBackgroundEnabled = off
	
	InvalidateAllBackgrounds()
)

/**************** DEFAULT GRADIENT ****************/
(
	viewport.EnableSolidBackgroundColorMode off

	def_top = colorMan.getDefaultColor #ViewportGradientBackgroundTop	
	def_bot = colorMan.getDefaultColor #ViewportGradientBackgroundBottom	
	colorMan.setColor #ViewportGradientBackgroundTop def_top
	colorMan.setColor #ViewportGradientBackgroundBottom def_bot


	s = NitrousGraphicsManager.GetActiveViewportSetting()
	s.UseEnvironmentBackgroundColorEnabled = off
	s.UseViewportBackgroundEnabled = off
	
	InvalidateAllBackgrounds()
)

/**************** CUSTOM ORANGE ****************/
(
	viewport.EnableSolidBackgroundColorMode on
	colorMan.setColor #ViewportBackground (orange as point4)

	s = NitrousGraphicsManager.GetActiveViewportSetting()
	s.UseEnvironmentBackgroundColorEnabled = off
	s.UseViewportBackgroundEnabled = on

	InvalidateAllBackgrounds()
)

/**************** CUSTOM DEFAULT ****************/
(
	viewport.EnableSolidBackgroundColorMode on
	def = colorMan.getDefaultColor #ViewportBackground	
	colorMan.setColor #ViewportBackground def

	s = NitrousGraphicsManager.GetActiveViewportSetting()
	s.UseEnvironmentBackgroundColorEnabled = off
	s.UseViewportBackgroundEnabled = on

	InvalidateAllBackgrounds()
)

 

0 Likes
Message 18 of 20

roberto.gagliano
Contributor
Contributor

Great, thanks!

Also thanks for your patience.

 

Just to let you understand, why it had to be like this for me:

I use the buttons to change the BG color for all VPs at once. Then i make one screenshot of all 4 VPs for quick customer feedback. The screenshots are arranged, scaled and cropped in Indesign and output as pdf, all on a white background. For additional pages with varying designs i simply make a new screenshot, and change the file links in Indesign.

To have the same model appearence for all VPs (shading with Standars or High Quality) it must be avoided that the BGcolor is set as Render Environment Color.

 

One last question: I use your line

" colorMan.setColor #ViewportBackground [0.19,0.19,0.19]"

to set custom colors or shades of gray. Is there a way to enter the color as RGB?

 

thanks in advance!

0 Likes
Message 19 of 20

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

Is there a way to enter the color as RGB?

 

colorMan.setColor needs a point3 (or point4) value (where a component is from 0.0 to 1.0).

you can convert RGB to point4, for example

 

colorMan.setColor #ViewportBackground (white as point4)
colorMan.setColor #ViewportBackground ((color 32 32 32) as point4)

 

  or to point3:

 

colorMan.setColor #ViewportBackground (white as point3 / 255)
colorMan.setColor #ViewportBackground ((color 32 32 32) as point3 / 255)

 

0 Likes
Message 20 of 20

roberto.gagliano
Contributor
Contributor

Thanks again!

0 Likes