Button for display style - command


#1

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

Thanks.


(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.


#3

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


#4

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.

c.


#5

awesome. Thanks