Post #358: ![](https://blenderartists.org/user_avatar/blenderartists.org/draguu/48/15444_2.

📋 Metadata

  • Author: roaoao
  • Date: 2016-09-30 12:21:43
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_00357

🏷️ Tags

pie-menu hotkeys intermediate solved

  • Pie Menu Editor
  • Python Scripting
  • Context Sensitive Menus

💬 Content

draguu:

i want to open menu01 is lamp is selected , menu02 if object is selected , and menu03 if nothing is selected

Did you try this example?
To open menu03 (when nothing is selected) you need to modify the code for ‘Object Context Sensitive Menu’:

name = C.selected_objects and C.active_object.type.title() or "Nothing"; open_menu(name) or open_menu("Object")

You need to rename menu01 to Lamp, menu02 to Object and menu03 to Nothing


🔗 View on Blender Artists