Sybren A. Stüvel a946244e7e Anim: F-Curve icons, return std::nullopt when RNA path cannot be resolved
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
2024-09-02 11:20:55 +02:00
2024-08-30 15:00:28 +02:00
2024-09-02 16:55:19 +10:00
2023-12-08 13:28:13 +11:00

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.

Blender screenshot

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
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%