ScriptSpot

Forum topic · General Scripting

Viewport Background Dialog question

By barigazy · 2012-04-24

Description

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

Comments (8)

pakwapansye · 2014-10-11

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.

tassel · 2012-04-24

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.

barigazy · 2012-04-24

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

viewport.DispBkgImage = true

jos · 2012-04-24

you can do this with


viewport.DispBkgImage = true
viewport.DispBkgImage = false

barigazy · 2012-04-24

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

jos · 2012-04-24

when I open the dialog the checkbox is disabled. What does it? cubemap? never used it..

barigazy · 2012-04-24

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

Or simply run this

barigazy · 2012-04-24

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

I did not know that this will be tricky one.