Cleanup: Access mesh edges, faces, and loops with spans #105138

Merged
Hans Goudey merged 2 commits from HooglyBoogly/blender:cleanup-mesh-data-access-span into main 2023-02-23 17:14:17 +01:00

2 Commits

Author SHA1 Message Date
Hans Goudey 14cff517af Cleanup: Access mesh edges, faces, and loops with spans
buildbot/vexp-code-patch-coordinator Build done. Details
Using spans instead of raw pointers helps to differentiate ararys from
pointers to single elements, gives bounds checking in debug builds, and
conveniently stores the number of elements in the same variable.

Also make variable naming consistent. For example, use `loops` instead
of `mloop`. The plural helps to clarify that the variable is an array.

I didn't change positions because there is a type mismatch between
C and C++ code that is ugly to manage. All remaining code can be
converted to C++, then that change will be simpler.
2023-02-23 10:39:51 -05:00
Hans Goudey 6294d92251 Cleanup: Remove unnecessary copying of mesh data outside CustomData
This code seems to be left over from before edges, polys, and loops were
stored in CustomData. They are already copied by the CustomData copy
calls directly above, which already deal with every other layer.
2023-02-23 10:33:50 -05:00