Mesh: Move bevel weight to generic attribute

Store bevel weights in two new named float attributes:
- `bevel_weight_vert`
- `bevel_weight_edge`

These attributes are naming conventions. Blender doesn't enforce
their data type or domain at all, but some editing features and
modifiers use the hard-coded name. Eventually those tools should
become more generic, but this is a simple change to allow more
flexibility in the meantime.

The largest user-visible changes are that the attributes populate the
attribute list, and are propagated by geometry nodes. The method of
removing this data is now the attribute list as well.

This is a breaking change. Forward compatibility is not preserved, and
the vertex and edge `bevel_weight` properties are removed. Python API
users are expected to use the attribute API to get and set the values.

Fixes #106949

Pull Request: https://projects.blender.org/blender/blender/pulls/108023
This commit is contained in:
Hans Goudey
2023-05-19 14:31:31 +02:00
committed by Hans Goudey
parent 51923c09e2
commit 2a56403cb0
27 changed files with 273 additions and 348 deletions

View File

@@ -496,16 +496,6 @@ class DATA_PT_customdata(MeshButtonsPanel, Panel):
else:
col.operator("mesh.customdata_custom_splitnormals_add", icon='ADD')
if me.has_bevel_weight_edge:
col.operator("mesh.customdata_bevel_weight_edge_clear", icon='X')
else:
col.operator("mesh.customdata_bevel_weight_edge_add", icon='ADD')
if me.has_bevel_weight_vertex:
col.operator("mesh.customdata_bevel_weight_vertex_clear", icon='X')
else:
col.operator("mesh.customdata_bevel_weight_vertex_add", icon='ADD')
if me.has_crease_edge:
col.operator("mesh.customdata_crease_edge_clear", icon='X')
else: