0
$\begingroup$

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”?

Thanks.

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

$\endgroup$
1
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.