f04bf1694f2d4ebfc07da9a8e1907836f3d5099f
Moving a set of keyframes could cause crashes by setting invalid `drawing_index` in `GreasePencilFrame` data. The transform operator for grease pencil keyframes can add and remove keyframes by overwriting existing frames. The `move_duplicate_frames` function in particular has to keep track of drawing user counts to ensure that the drawings referenced by the frames are still alive at the end. This was broken when moving multiple keyframes at once, such that later keyframes would overwrite the target positions for earlier frames (for example moving frames [1,2,3] to [2,3,4]). The `move_duplicate_frames` was first removing the source frame and then adding it back at the destination. In case the source frame was already the destination of an earlier keyframe, this will cause incorrect user count because the frame being removed is not the same as the one being added back. To avoid this problem, remove all the source keyframes first before any other modification of the destination layer. That way we can be sure the frames at the source index is actually the expected frame. Pull Request: https://projects.blender.org/blender/blender/pulls/119207
…
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
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
