I'm preparing myself to transition to 2.8, and I need help to recreate hotkeys removed in this version.

Before 2.8 you could use Shift+z to toggle the Rendered mode in the 3D view. The python for that was view3d.toggle_render. Yes, I'm aware it's on the pie menu, and I find cumbersome and impractical.

In Blender 2.8, according to this ticket, the code is (VIEW3D_OT_toggle_shading, RENDER). "Render" is supposed to be the type (View3DShading.type). I don't know how set that in the hotkey field. Using only the first part makes toggles between Wireframe and whatever view mode you were previously at. The behavior I'm trying to rescue is going to and from the rendered mode to the mode you were previously seeing.


I was so distracted hunting down 2.8 methods I completely overlooked the seemingly disabled dropdown that appears when you use the VIEW3D_OT_toggle_shading method:

toggle shading hotkey dropdown

Despite being grayed out, it's interactive. That's where you set the type, not through the code.

toggling shading hotkey dropdown


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.