diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-09 16:29:07 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-09 16:29:47 +0300 |
commit | 291c313f80b4cccc8fcce3035584caeaa654844f (patch) | |
tree | cdc3469c825babf773c3c2cc9de678d193bec9db /source/blender/blenkernel/intern/subdiv_mesh.cc | |
parent | 21f2bacad977d3fd83d9e4730f2a14dc9932f043 (diff) |
Mesh: Move bevel weight out of MVert and MEdge
As described in T95966, the goal is to move to a "struct of arrays"
approach rather than gathering an arbitrary set of data in hard-coded
structs. This has performance benefits, but also code complexity
benefits (this patch removes plenty of code, though the boilerplate
for the new operators outweighs that here).
To mirror the internal change, the options for storing mesh bevel
weights are converted into operators that add or remove the layer,
like for some other layers.
The most complex change is to the solidify modifier, where bevel
weights had special handling. Other than that, most changes are
removing clearing of the weights, boilerplate for the add/remove
operators, and removing the manual transfer of bevel weights
in bmesh - mesh conversion.
Eventually bevel weights can become a fully generic attribute,
but for now this patch aims to avoid most functional changes.
Bevel weights are still written and read from the mesh in the old way,
so neither forward nor backward compatibility are affected. As described
in T95965, writing in the old format will be done until 4.0.
Differential Revision: https://developer.blender.org/D14077
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_mesh.cc')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_mesh.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_mesh.cc b/source/blender/blenkernel/intern/subdiv_mesh.cc index dc9fc3dee09..44bdd6e6d06 100644 --- a/source/blender/blenkernel/intern/subdiv_mesh.cc +++ b/source/blender/blenkernel/intern/subdiv_mesh.cc @@ -791,7 +791,6 @@ static void subdiv_copy_edge_data(SubdivMeshContext *ctx, const int subdiv_edge_index = subdiv_edge - ctx->subdiv_edges; if (coarse_edge == nullptr) { subdiv_edge->crease = 0; - subdiv_edge->bweight = 0; subdiv_edge->flag = 0; if (!ctx->settings->use_optimal_display) { subdiv_edge->flag |= ME_EDGERENDER; @@ -1138,9 +1137,6 @@ static void subdiv_mesh_vertex_of_loose_edge(const SubdivForeachContext *foreach subdiv_vertex->co); /* Reset flags and such. */ subdiv_vertex->flag = 0; - /* TODO(sergey): This matches old behavior, but we can as well interpolate - * it. Maybe even using vertex varying attributes. */ - subdiv_vertex->bweight = 0.0f; } /** \} */ |