971f3e0699
The Grease Pencil `Clipboard` only stored a single `CurvesGeometry`. This meant that the `Paste by Layer` operation (from 4.2 LTS) couldn't be implemented. This PR adds an `Array` of `ClipboardLayer`s to the `Clipboard`. Each layer stores the name of the Grease Pencil layer that it was copied from and the `CurvesGeometry`. The `grease_pencil.paste` operator has a new property `type` (`ACTIVE` or `LAYER`) that decides how to paste the strokes. Using the `ACTIVE` type, the strokes of all the `ClipboardLayer`s get merged and then pasted to the active layer. Using the `LAYER` type, we first try to find layers to paste the `ClipboardLayer`s into. We just look for matching layer names. If no matching layer is found, the strokes are pasted into the active layer instead. This should be consistent with how Grease Pencil used to behave in 4.2. LTS. Pull Request: https://projects.blender.org/blender/blender/pulls/134168