Post #1993: ![](https://blenderartists.org/user_avatar/blenderartists.org/z01ks/48/564304_2.

📋 Metadata

🏷️ Tags

pie-menu custom-properties advanced solved

  • Pie Menu Editor
  • Float Properties
  • Python Scripting
  • Property Editor

💬 Content

z01ks:

Hello! I’d like to add Edge Crease and Edge Bevel Weight as values into a Pie Menu, which I could drag left and right. At the moment, I only know how to assign the Edge Crease or Bevel Weight as buttons, which take me to into the Modal where I can move my cursor around on the screen to change the value.

Would it be possible to have Edge Crease and Bevel Weight values directly exposed in a Pie Menu so that I can drag left and right or click and enter a value?

We don’t have access to these buttons from python. But you can create your own. Add Float Properties with these getter and setter (edge_crease_and_bevel_weight.json):

Edge Bevel Weight Getter:

import bmesh; obj = C.edit_object; me = obj and obj.type == 'MESH' and obj.data; bm = me and bmesh.from_edit_mesh(me); l = me and bm.edges.layers.bevel_weight.verify(); e = me and find_by(bm.edges, "select", True); return e[l] if e else 0

Edge Bevel Weight Setter:

import bmesh; obj = C.edit_object; me = obj and obj.type == 'MESH' and obj.data; bm = me and bmesh.from_edit_mesh(me); l = me and bm.edges.layers.bevel_weight.verify(); me and [e.__setitem__(l, value) for e in bm.edges if e.select]; me and bmesh.update_edit_mesh(me)

Edge Crease Getter:

import bmesh; obj = C.edit_object; me = obj and obj.type == 'MESH' and obj.data; bm = me and bmesh.from_edit_mesh(me); l = me and bm.edges.layers.crease.verify(); e = me and find_by(bm.edges, "select", True); return e[l] if e else 0

Edge Crease Setter:

import bmesh; obj = C.edit_object; me = obj and obj.type == 'MESH' and obj.data; bm = me and bmesh.from_edit_mesh(me); l = me and bm.edges.layers.crease.verify(); me and [e.__setitem__(l, value) for e in bm.edges if e.select]; me and bmesh.update_edit_mesh(me)

You can use these properties in Menu tab.


❤️ 5 likes


🔗 View on Blender Artists