ScriptSpot home

Forum topic · General Scripting

Viewport Background Dialog question

By Branko Živković · 2012-04-24

Description

How to check or uncheck "Use Viewport Background" checkbox in
the Viewport Background Dialog using the script?

Comments (8)
Pakwa Hicks

You can offer a series of images with different poses and positions. Perhaps leaning on a tree or sitting on the couch. Professional backdrops for photography with an eye to appealing to compose shots, so you can get a variety of shots to soften.

Raymond Homme Ingebretsen

Not sure what you are looking for ;o)


actionMan.executeAction 0 "617"  -- Tools: Use Gradient Colors Toggle
actionMan.executeAction 0 "618"  -- Tools: Use Solid Colors Toggle
actionMan.executeAction 0 "619"  -- Tools: Use Environment Background Toggle
actionMan.executeAction 0 "620"  -- Tools: Use Files Toggle

<boolean>viewport.EnableSolidBackgroundColorMode <bool>
<boolean>viewport.IsSolidBackgroundColorMode()

<ViewportViewSettingImpl>.UseViewportBackgroundEnabled : bool : Read|Write
  NEW in 3ds Max 2013: No effect.
   
<ViewportViewSettingImpl>.UseSolidColor : bool : Read|Write
  NEW in 3ds Max 2013: No effect.
Reply to Raymond Homme Ingebretsen
Branko Živković

Hi tassel,
I know that max2013 have new option but I am currently writing a script for versions below 2013.
I try

actionMan.executeAction 0 "619"

but this only print in listiner

false

.
Look the image in the attachment

Attachments
Jos Balcaen

viewport.DispBkgImage = true

you can do this with


viewport.DispBkgImage = true
viewport.DispBkgImage = false
Reply to Jos Balcaen
Branko Živković

Not "Display Background" checkbox but "Use Environment Background"
at the top of Viewport Background dialog

Reply to Jos Balcaen
Branko Živković

You must assigne first a map as environment map and check "Use Map".
Then press "Alt+B".

Reply to Jos Balcaen
Branko Živković

Or simply run this

environmentmap = Gradient ()
useEnvironmentMap = on
max background display toggle

I did not know that this will be tricky one.