How do I control "Disable Viewport" with a script?


#1

Hello

The ability to write ‘D’ as a shortcut.

“actionMan.executeAction 0 “40126” – Views: Disable Viewport”
I found this command on the listener, but it’s a toggle, so it’s on and off.
I want to control disabled viewport with script in viewport
I want to run the script and turn it off.

Please, help a lot.


#2

disableSceneRedraw()

enableSceneRedraw()


#3

better equivalent to disabling the CURRENT viewport. is the following snippet
( pass false to enable it again )

(nitrousgraphicsmanager.GetActiveViewportSetting()).DisableViewport = true

there are also commands to access viewport settings via viewport index,
nitrousgraphicsmanager.GetViewportSetting etc. …