Commit Graph

9 Commits

Author SHA1 Message Date
Hans Goudey 820865bacf Cleanup: Improve EditMeshData comments 2024-04-02 21:11:34 -04:00
Hans Goudey 5b9ed4258b Cleanup: Access edit mesh caches with span return values
Instead of accessing the data directly from the cache struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/120191
2024-04-03 00:36:29 +02:00
Hans Goudey 931206d3dc Cleanup: Rename mesh face deformed edit position variables
Use standard naming similar to their `Mesh` counterparts.
2024-03-28 18:28:35 -04:00
Hans Goudey 695e626d3f Cleanup: Store more mesh runtime data with unique_ptr
Convert shrinkwrap data arrays to use C++ arrays and BitVector,
use references in "EditMeshData" code, and store both structs
with `std::unique_ptr` instead of a raw allocation.
2023-12-04 15:23:24 -05:00
Hans Goudey 41f9f2753a Refactor: Mesh: Include wrapper positions in bounds result
Avoid the need to call the separate `BKE_mesh_wrapper_minmax` function
that dealt with the edit mesh wrapper. This makes the API inconsistent,
since other mesh functions don't implicitly deal with the wrapper.
But the bounds are a bit of a special case anyway in regard
to the GPU subdivision wrapper already, and this is much more
convenient in the rest of the refactors for #96968.
2023-11-19 18:36:19 -05:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Hans Goudey 5e9ea9243b Mesh: Rename "polys" to "faces"
Implements part of #101689.

The "poly" name was chosen to distinguish the `MLoop` + `MPoly`
combination from the `MFace` struct it replaced. Those two structures
persisted together for a long time, but nowadays `MPoly` is gone, and
`MFace` is only used in some legacy code like the particle system.

To avoid unnecessarily using a different term, increase consistency
with the UI and with BMesh, and generally make code a bit easier to
read, this commit replaces the `poly` term with `poly`. Most variables
that use the term are renamed too. `Mesh.totface` and `Mesh.fdata` now
have a `_legacy` suffix to reduce confusion. In a next step, `pdata`
can be renamed to `face_data` as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/109819
2023-07-24 22:06:55 +02:00
Hans Goudey 3d383d383f Cleanup: Use C++ Array types for Edit Mesh SoA cache
This helps const correctness since the data can't be changed from a
const EditMeshData struct, and simplifies memory management.

Pull Request: https://projects.blender.org/blender/blender/pulls/109821
2023-07-10 19:49:54 +02:00
Hans Goudey 75b42d1d95 Cleanup: Move BKE_editmesh_cache.h to C++
See #103343
2023-07-07 08:19:52 -04:00