Button for display style - command


Can someone please tell me how to make a button to set a specific display style.
What would the command be?


(Menno Deij - van Rijswijk) #2

You are probably looking for SetDisplayMode command. This can act on the active or all viewports and you can set the mode to wireframe, shaded, rendered, etc.
Also, there is the SetObjectDisplayMode to override the display mode for certain objects.


thanks. But how would I turn that into one command that I can run by clicking a button.


To set objects to eg. Wireframe you can use this button command:

! _SetObjectDisplayMode _Pause _Mode Wireframe

To reset them to use the current active display mode, you can use this:

! _SetObjectDisplayMode _Pause _Mode UseView

Also take a look at this thread by @Helvetosaur, where he posted scripts to set the display mode per object(s) for all views.



awesome. Thanks