Post #2362: ![](https://blenderartists.org/user_avatar/blenderartists.org/casterle/48/570987

📋 Metadata

  • Author: roaoao
  • Date: 2019-05-28 10:12:15
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_02360

🏷️ Tags

pie-menu hotkeys beginner solved

  • Pie Menu Editor
  • Custom tab
  • Python scripting

💬 Content

casterle:

I can’t get this working.

roaoao:

L.prop(C.space_data.shading, "type", expand=True)

When I put

L.prop(C.space_data.shading, "WIREFRAME", expand=True)

Use that exact code in the first slot/button of a new empty pie menu (Custom tab). Don’t modify the code.

L.prop(C.space_data.shading, "type", expand=True)

This code will display all available shading types as separate buttons.

If you want to write the code for each slot manually you can use this (Custom tab):

L.prop_enum(C.space_data.shading, "type", "WIREFRAME")

You can find all available functions here.

casterle:

If I try your 2nd example:

It was just an example of how to highlight a tool button.

casterle:

is there a way I can view how a standard pie menu item is configured so I can look at examples

This doesn’t work for pie menus but for most of buttons you can find the source code in RMB context menu:

https://i.imgur.com/6oqzyjS.mp4

casterle:

rather than having to bother you here? :smiley:

Np, feel free to ask :+1:


❤️ 1 likes


🔗 View on Blender Artists