Post #3733: Since there is no way to access that tab and you basically have to remake it, I
π Metadata
- Author: Motiomancer
- Date: 2021-01-03 02:46:32
- Type:
answer - Quality Score: 9/10
- Reply to: post_03732
- Replies (1): post_03735
π·οΈ Tags
pie-menu python-scripting advanced solved
βοΈ Related PME Features
- Pie Menu Editor
- Property Editor
- Python Scripting
π¬ Content
Since there is no way to access that tab and you basically have to remake it, I was going to tell you it was impossible with someone with basic python knowledge like me to do it but ended up finding this answer from roaoao
roaoao:
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 0Edge 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 0Edge 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
Menutab.
Just import that .json with the properties menus and add them in the menu tab

β€οΈ 2 likes