Post #2750:
Ma
π Metadata
- Author: roaoao
- Date: 2019-09-16 14:43:06
- Type:
answer - Quality Score: 8/10
- Reply to: post_02749
- Replies (1): post_02753
π·οΈ Tags
macro custom-scripts advanced solved
βοΈ Related PME Features
- Macro Editor
- Command tab
- Python Scripting
- Custom presets
π¬ Content
MatsuikoHiroka:
i hope you can add more json files that cant be strip from PME
Here is custom Float Property examples for curve radius, tilt and weight data.
MatsuikoHiroka:
i like to make a custom preset value button for setting up edge crease & bevel weight like this shown in image
Yes, we donβt have access to these buttons from python. You need to write some custom script for this. Eg (Command tab):
Crease 0.5:
value = 0.5; 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)
Bevel Weight 0.4:
value = 0.4; 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)
β€οΈ 4 likes