Post #258: ![](https://blenderartists.org/user_avatar/blenderartists.org/minato/48/21129_2.

📋 Metadata

  • Author: roaoao
  • Date: 2016-08-01 01:05:07
  • Type: answer
  • Quality Score: 7/10
  • Reply to: post_00256

🏷️ Tags

pie-menu macro scripting intermediate

  • Pie Menu Editor
  • Macro Editor
  • Python Scripting
  • Command tab
  • Custom tab

💬 Content

minato:

how do I execute multiple lines of code, like a macro, with a pie menu item?

You can save the code as *.py file (e.g. in pie_menu_editor/scripts folder). And use it as an

in Command or Custom tab.
The code in Command tab will be executed when the user presses the button.
The code in Custom tab is used to draw custom layouts/buttons.


🔗 View on Blender Artists