Post #412: ![](https://blenderartists.org/user_avatar/blenderartists.org/nanomanpro/48/1874

๐Ÿ“‹ Metadata

๐Ÿท๏ธ Tags

macro python-scripting intermediate solved

  • Macro Editor
  • Python Scripting
  • Command tab

๐Ÿ’ฌ Content

Nanomanpro:

Is it possible to use this kind of code as โ€œPropertyโ€? I mean ability to turn on and off โ€œWireโ€ using just one button.

Thx.

Hi, try this code in Command tab:

meshes = [o for o in bpy.data.objects if o.type == 'MESH']; global show_wire; show_wire = meshes and not meshes[0].show_wire; [setattr(m, "show_wire", show_wire) for m in meshes]

๐Ÿ”— View on Blender Artists