Files
test2/source/blender/blenlib
Hans Goudey dcb3b1c1f9 Geometry: Use implicit sharing for curve and mesh offsets
Similar to 7eee378ecc, this change decreases memory usage and
improves performance when copying curves and meshes without changing
their topology. The same change used for custom data layers is applied
to face and curve offset indices, which aren't stored as a custom data
layer.

The implicit sharing info for the offsets is stored in the mesh and
curve runtime structs, since it doesn't need to be written to files
directly. When changing the offsets pointer directly, the sharing info
must be updated accordingly. To make that easier, a few utility
functions take care of common operations like making an array mutable,
resizing an array, and creating sharing info for allocated data.

This commit also clarifies the intention to not allocate the offsets
at all when there are no curves/faces. That slightly complicates some
of the logic, but there's no reason for the single `0` integer to be
allocated.

Pull Request: https://projects.blender.org/blender/blender/pulls/106907
2023-04-14 17:58:13 +02:00
..
2022-12-29 12:01:32 -05:00
2022-11-08 15:50:49 +01:00
2022-11-12 18:33:31 +01:00
2022-11-12 18:33:31 +01:00
2023-03-09 18:15:22 +01:00
2023-03-09 10:39:49 +11:00
2023-03-27 12:08:14 +11:00
2023-01-31 15:49:04 +11:00