I want to set up key shortcuts for viewport shading modes. Problem is, I can’t figure out which keyword is the mode for Bounding Box.

I’ve got the other ones working, Rendered, Material, Textured, Solid, Wireframe all work.

I’ve tried the following: BOUNDINGBOX, BOUNDING_BOX, BOUNDING, BOX, BOUNDS, and several variations, none work.

Here are the user input values: screenshot

Might you know which keyword works for “Bounding Box”?


Edit: In case it helps, the Context value is: space_data.viewport_shade


1 Answer 1


Go over to the 3D View Header, right click over the Viewport Shading Mode menu and choose the option Online Python reference.

That should take you to the Blender's Official Python API Documentation where you can learn all about it.

There you will learn that the the viewport_shadeproperty is an enum that accepts [‘BOUNDBOX’, ‘WIREFRAME’, ‘SOLID’, ‘TEXTURED’, ‘MATERIAL’, ‘RENDERED’]string values.

The one you are looking for would hence be BOUNDBOX.

Viewport Shading


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .