Post #2957: ![](https://blenderartists.org/user_avatar/blenderartists.org/anphung/48/39426_2

πŸ“‹ Metadata

  • Author: roaoao
  • Date: 2020-01-10 10:22:51
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_02955

🏷️ Tags

pie-menu hotkeys intermediate solved

  • Pie Menu Editor
  • Python Scripting
  • Command Tab

πŸ’¬ Content

anphung:

When I click on the β€˜Wire’ item in the Display as dropdown while holding Alt, it applies to multiple objects at once, could you show me how to translate that to a command?

Yes, you can check E.alt == True value in Command tab:

setattr(C.object, "display_type", 'WIRE') if E.alt == False else [setattr(obj, "display_type", 'WIRE') for obj in C.selected_objects]

❀️ 3 likes


πŸ”— View on Blender Artists