a946244e7e8a1a6506dc6632d4520c98b8bf6c97
Use an `std::optional<int>` to return the icon from `getname_anim_fcurve()`. This function is used both to get the name and to get the icon of whatever the F-Curve is animating. Sometimes the animated struct doesn't have an icon though. In some cases we need to know whether it could resolve the RNA path correctly or not, and checking for 'no icon' was not enough because that may be a valid return value. The returned icon is now wrapped in an `std::optional<int>`, and a `std::nullopt` is returned whenever the icon cannot be determined. No functional changes, except in the two places where the icon is actually used. In case of error there is now always a fallback to the struct icon of the animated ID (previously this was only a fallback when the RNA path was there but could not be resolved; now it's also used when the RNA path is empty, for example). Pull Request: https://projects.blender.org/blender/blender/pulls/125666
…
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%
