Mesh: Move functions to C++ header

Refactoring mesh code, it has become clear that local cleanups and
simplifications are limited by the need to keep a C public API for
mesh functions. This change makes code more obvious and makes further
refactoring much easier.

- Add a new `BKE_mesh.hh` header for a C++ only mesh API
- Introduce a new `blender::bke::mesh` namespace, documented here:
  https://wiki.blender.org/wiki/Source/Objects/Mesh#Namespaces
- Move some functions to the new namespace, cleaning up their arguments
- Move code to `Array` and `float3` where necessary to use the new API
- Define existing inline mesh data access functions to the new header
- Keep some C API functions where necessary because of RNA
- Move all C++ files to use the new header, which includes the old one

In the future it may make sense to split up `BKE_mesh.hh` more, but for
now keeping the same name as the existing header keeps things simple.

Pull Request: blender/blender#105416
This commit is contained in:
2023-03-12 22:29:15 +01:00
committed by Hans Goudey
parent 5669c5a61b
commit 1dc57a89e9
295 changed files with 1385 additions and 1607 deletions

View File

@@ -34,7 +34,7 @@
# include "BKE_customdata.h"
# include "BKE_editmesh_bvh.h"
# include "BKE_lib_id.h"
# include "BKE_mesh.h"
# include "BKE_mesh.hh"
# include "BKE_mesh_runtime.h"
# include "DEG_depsgraph_query.h"