c0c7e34bab7dda313efe4d17b15bd8d07f4f0921
Fix a crash when inserting a key with tweak mode enabled, but where `AnimData::actstrip` was NULL. The root cause of this is that two pointers in the `AnimData` struct (`act_track` and `actstrip`) are expected to be set when NLA tweak mode is enabled, BUT these are not exposed to RNA and thus invisible to the library overrides system. As such, they are NULL when loading from disk, while the `ADT_NLA_EDIT_ON` flag still indicates they are to be used. Rather than adding a NULL pointer check (and having to add that in many more places), I used this two-pronged approach: - Extend the 'NLA tweakmode' override apply code, to set the `act_track` and `actstrip` pointers when they are incorrectly NULL. This is done by lookup of the track and strip by name. - Add versioning code to exit out of tweak mode whenever the `ADT_NLA_EDIT_ON` flag is set, but those two pointers are still NULL. The last step was necessary with the example file attached to the bug report, as that was saved with a buggy blender version. New saves work just fine. Pull Request: https://projects.blender.org/blender/blender/pulls/119632
…
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%
