diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-20 01:08:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-20 01:08:02 +0300 |
commit | 6a3c3c77b3ebdbcd44559bf91ea7d5cf3c5e4953 (patch) | |
tree | 619854e36d34502c1f81f0fd1ec7b0454fecc5b3 /source/blender/blenkernel/intern/curve_to_mesh_convert.cc | |
parent | 9ec94c3882a414dc60dd17abfa12838f94f63c24 (diff) |
Mesh: Avoid unnecessary normal calculation and dirty tags
This is mostly a cleanup to avoid hardcoding the eager calculation of
normals it isn't necessary, by reducing calls to `BKE_mesh_calc_normals`
and by removing calls to `BKE_mesh_normals_tag_dirty` when the mesh
is newly created and already has dirty normals anyway. This reduces
boilerplate code and makes the "dirty by default" state more clear.
Any regressions from this commit should be easy to fix, though the
lazy calculation is solid enough that none are expected.
Diffstat (limited to 'source/blender/blenkernel/intern/curve_to_mesh_convert.cc')
-rw-r--r-- | source/blender/blenkernel/intern/curve_to_mesh_convert.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc index c48d155f5ce..d7fd8f7a2b6 100644 --- a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc +++ b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc @@ -649,7 +649,6 @@ Mesh *curve_to_mesh_sweep(const CurvesGeometry &main, offsets.vert.last(), offsets.edge.last(), 0, offsets.loop.last(), offsets.poly.last()); mesh->flag |= ME_AUTOSMOOTH; mesh->smoothresh = DEG2RADF(180.0f); - BKE_mesh_normals_tag_dirty(mesh); MutableSpan<MVert> verts(mesh->mvert, mesh->totvert); MutableSpan<MEdge> edges(mesh->medge, mesh->totedge); MutableSpan<MLoop> loops(mesh->mloop, mesh->totloop); |