5f464b2de04c6b6e351c4046ec28e55839a7adf4
When iterating over the layers in a Grease Pencil object, removing the layers can lead to crashes. This PR is a better alternative to !135253. Instead of checking if the layer is valid, simply fetch the latest layer cache for each iteration and check if the index is valid. This means that we will skip over layers if they get removed during iteration, but we no longer can crash. If users want to remove multiple layers at once, it's better to do this in two passes. E.g. by first collecting the names of the layers to remove, iterating over these names and then removing the layers by getting it by its name. Pull Request: https://projects.blender.org/blender/blender/pulls/135574
…
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
11%
C
6.3%
GLSL
2.2%
CMake
1.3%
Other
1.1%
