Post #3398: ![](https://blenderartists.org/user_avatar/blenderartists.org/xmaiter/48/563790_

๐Ÿ“‹ Metadata

๐Ÿท๏ธ Tags

pie-menu popup-dialog hotkeys advanced solved

  • Custom tab scripting
  • Stack Key Editor
  • Modal operator support
  • Python scripting

๐Ÿ’ฌ Content

Xmaiter:

How to add a switch and checkbox(for example solid>wireframe) ?

You can use Custom tab for this:

text, icon, id = ("Solid", 'SHADING_SOLID', 'WIREFRAME') if C.space_data.shading.type == 'SOLID' else ("Wire", 'SHADING_WIRE', 'SOLID'); L.operator("pme.exec", text=text, icon=icon).cmd = "C.space_data.shading.type = '%s'" % id

Xmaiter:

Is it possible to do modal operator for function โ€œnext select vertex,edge,faceโ€?

You want to toggle vertex -> edge -> face -> vertex -> ... modes?
Add a Stack Key with this slot:

msm = C.tool_settings.mesh_select_mode; C.tool_settings.mesh_select_mode = (msm[2], msm[0], msm[1])

Xmaiter:

Is it possible to record a macro that will add a node (for example bevel) to the desired slot - normal?

Record? No.
But you can write a script for this.

Xmaiter:

This Popup Dialog

What do you want to do with this popup? And where I can find it?


โค๏ธ 3 likes


๐Ÿ”— View on Blender Artists