WIP Fix #104501: CLear CD_FLAG_NOCOPY flag after use. Handle the case when it goes wrong more elegantly. #104600

Merged
Martijn Versteegh merged 3 commits from Baardaap/blender:crashoninset into main 2023-02-13 20:08:40 +01:00

3 Commits

Author SHA1 Message Date
Martijn Versteegh 7a20b0dd39 Merge branch 'main' into crashoninset 2023-02-13 20:03:38 +01:00
Martijn Versteegh 7f99fca7f1 BMesh: Add flexibility for future lazily created UV selection
Don't crash on nonexisting uv selection layers. Add an assert
because for now it is a bug if they don't exist. But when converting
back to Mesh it is preferable to accept in release mode, as opposed to
crashing.
2023-02-13 19:13:54 +01:00
Martijn Versteegh e9462b30b3 Fix #104501: Clear CD_FLAG_NOCOPY after use
When generating a Mesh from a BMesh the uv map bool layers are not
copied if all elements are false. To suppress the copying the flag
CD_FLAG_NOCOPY is set in the layer flags. However these layers *do*
need to be copied to other BMeshes (for example undo steps). So we
need to clear them afterwards.
2023-02-13 19:13:33 +01:00