Files
test/source/blender/animrig/CMakeLists.txt
Sybren A. Stüvel d94a56bdad Anim: merge Animation data-block into bAction
The new/experimental, layered `Animation` data-block is merged with the
existing `bAction` data-block.

The `Animation` data-block is considerably newer than `bAction`, so the
supporting code that was written for it is also more modern. When moving
that code into `bAction`, I chose to keep the modernity where possible,
and thus some of the old code has been updated as well. Things like
preferring references over pointers.

The `Animation` data-block is now gone from DNA, the main database, etc.
As this was still an experimental feature, there is no versioning code
to convert any of that to Actions.

The DNA struct `bAction` now has a C++ wrapper `animrig::Action`, that
can be obtained via `some_action->wrap()`.

`animrig::Action` has functions `is_empty()`, `is_action_legacy()`, and
`is_action_layered()`. They **all** return `true` when the Action is
empty, as in that case none of the data that makes an action either
'legacy' or 'layered' is there.

The 'animation filtering' code (for showing things in the dope sheet,
graph editor, etc) that I wrote for `Animation` is intentionally kept
around. These types now target 'layered actions' and the
already-existing ones 'legacy actions'. A future PR may merge these two
together, but given how much work it was to add something new there, I'd
rather wait until the dust has settled on this commit.

There are plenty of variables (and some comments) named `anim` or
`animation` that now are of type `animrig::Action`. I haven't renamed
them all, to keep the noise level low in this commit (it's already big
enough). This can be done in a followup, non-functional PR.

Related task: #121355

Pull Request: https://projects.blender.org/blender/blender/pulls/121357
2024-05-13 15:58:04 +02:00

80 lines
1.5 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/evaluation.cc
intern/fcurve.cc
intern/keyframing.cc
intern/keyframing_auto.cc
intern/visualkey.cc
ANIM_action.hh
ANIM_animdata.hh
ANIM_armature_iter.hh
ANIM_bone_collections.hh
ANIM_bonecolor.hh
ANIM_driver.hh
ANIM_evaluation.hh
ANIM_fcurve.hh
ANIM_keyframing.hh
ANIM_keyingsets.hh
ANIM_rna.hh
ANIM_visualkey.hh
intern/bone_collections_internal.hh
intern/evaluation_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
PRIVATE bf::intern::clog
)
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/animation_test.cc
intern/bone_collections_test.cc
intern/evaluation_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()