Files
test/source/blender/animrig/CMakeLists.txt
Christoph Lendenfeld 57419c9653 Refactor: keyframing functions return more detailed status
The keyframing functions up to this point created many
messages through the `ReportList` about what went wrong
when inserting keys.

This has 2 issues:
* Everyone that wants to insert keyframes needs to have
a `ReportList` which comes from `bContext`
* The keyframing functions are very verbose.
Providing the user with errors when there is actually nothing wrong.

To combat that, return a status enum from functions that deal
with a single FCurve.
Functions that deal with more than one FCurve collect those statuses
into a new class `CombinedKeyingResult`
Based on that we can create a single well worded error message,
instead of potentially flooding the user with individual messages.

The downside is that some info is lost, e.g. we do not
know which exact FCurve has failed.

This will show a formatted error when inserting keys with a keying
set or when pressing `I` over the property to keyframe.
But not when pressing `I` in the viewport. The latter can be fixed in a later patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/117449
2024-03-08 09:56:40 +01:00

74 lines
1.3 KiB
CMake

# SPDX-FileCopyrightText: 2023 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
set(INC
PUBLIC .
intern
../blenkernel
../blentranslation
../editors/include
../makesrna
../windowmanager
../../../extern/fmtlib/include
# RNA_prototypes.h
${CMAKE_BINARY_DIR}/source/blender/makesrna
)
set(INC_SYS
)
set(SRC
intern/action.cc
intern/anim_rna.cc
intern/animation.cc
intern/animdata.cc
intern/bone_collections.cc
intern/bonecolor.cc
intern/driver.cc
intern/fcurve.cc
intern/keyframing.cc
intern/keyframing_auto.cc
intern/visualkey.cc
ANIM_action.hh
ANIM_animation.hh
ANIM_animdata.hh
ANIM_armature_iter.hh
ANIM_bone_collections.hh
ANIM_bonecolor.hh
ANIM_driver.hh
ANIM_fcurve.hh
ANIM_keyframing.hh
ANIM_rna.hh
ANIM_visualkey.hh
intern/bone_collections_internal.hh
)
set(LIB
bf_blenkernel
bf::blenlib
PRIVATE bf::depsgraph
bf::dna
PRIVATE bf_editor_interface
PRIVATE bf::intern::guardedalloc
PRIVATE bf::intern::atomic
)
blender_add_lib(bf_animrig "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
add_library(bf::animrig ALIAS bf_animrig)
if(WITH_GTESTS)
set(TEST_INC
)
set(TEST_SRC
intern/bone_collections_test.cc
)
set(TEST_LIB
PRIVATE bf::animrig
)
blender_add_test_suite_lib(animrig "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
endif()