Nitrous ToggleMode (Get Active Viewport Settings)

Is there anyone here who has any idea why "Facets" fail in my script?
-- Runtime Error: Unrecognized code: #Facets

global Nitrous_ToggleMode = NitrousGraphicsManager.GetActiveViewportSetting() 
try(destroyDialog rol_Nitrous_ToggleMode)catch() 
 
rollout rol_Nitrous_ToggleMode "NitrousMode" 
( 
   dropdownlist ddl_NTMode items:#("Realistic", "Shaded", "Facets", "ConsistentColors", "Wireframe", "BoundingBox", "Ink", "ColorInk", "Acrylic", "Tech", "Graphite", "ColorPencil", "Pastel")  height:15 
 
   fn updateList = 
      ( 
         ddl_NTMode.selection = findItem (for i in ddl_NTMode.items collect i as name 
      ) -- End Fn 
 
   on ddl_NTMode selected itm do 
      ( 
         Nitrous_ToggleMode.VisualStyleMode =  ddl_NTMode.selected as name 
      ) -- End On 
 
) -- End Rollout 
 
   createDialog rol_Nitrous_ToggleMode 115 30

i also tried to do an radiobutton version that works:

try(destroyDialog rol_NRB)catch() 
 
global Nitrous_ToggleMode = NitrousGraphicsManager.GetActiveViewportSetting() 
 
rollout rol_NRB "VP Modes" 
( 
 
   radiobuttons rb_NitrousMode labels:#("Realistic","Shaded","Facets","ConsistentColors") default:1 enabled:true 
 
 
   on rb_NitrousMode changed state do 
      ( 
         case state of 
            ( 
               1: Nitrous_ToggleMode.VisualStyleMode = 0
               2: Nitrous_ToggleMode.VisualStyleMode = 1 
               3: Nitrous_ToggleMode.VisualStyleMode = 2 
               4: Nitrous_ToggleMode.VisualStyleMode = 3 
            ) 
      ) 
) -- End Rollout 
 
createDialog rol_NRB 115 65 150 150

Thanks in advance.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tassel's picture

This

This works:

try(destroyDialog rol_Nitrous_ToggleMode)catch()
 
rollout rol_Nitrous_ToggleMode "NitrousMode"
   ( 
      dropDownList ddlStyles items:#(#Realistic, #Shaded, #Facets, #ConsistentColors, #HiddenLine, #Wireframe, #BoundingBox, #Ink, #ColorInk, #Acrylic, #Tech, #Graphite, #ColorPencil, #Pastel) height:15
 
	   on ddlStyles selected item do 
         (nitrousGraphicsManager.getActiveViewportSetting()).visualStyleMode = item - 1 
   )
	createDialog rol_Nitrous_ToggleMode 115 30 150 150

Raymond H.Ingebretsen - http://www.homme3d.com

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.