Post #311: a_

📋 Metadata

  • Author: roaoao
  • Date: 2016-09-11 00:58:06
  • Type: answer
  • Quality Score: 7/10
  • Reply to: post_00310

🏷️ Tags

pie-menu custom-menus advanced

  • Custom tab scripting
  • Menu Editor
  • Python Scripting
  • Operator execution

💬 Content

a_guy73:

I have already tried that code I but it offsets itself and doubles the width of the panel for some reason.
Is possible to modify that L.box() code?

For regular menu you can use this code (Custom tab):

[setattr(L.operator("wm.pme_user_command_exec", b.name, icon=("BRUSH_" + b.sculpt_tool) if b.sculpt_tool != 'DRAW' else 'BRUSH_SCULPT_DRAW'), "cmd", "C.tool_settings.sculpt.brush = D.brushes['%s']" % b.name) for b in D.brushes if b.use_paint_sculpt]

You can create a regular menu with this code and use it in your main menu as a sub-menu.


🔗 View on Blender Artists