Instead of assigning Actions by direct pointer manipulation (and the corresponding juggling of user counts), call `animrig::assign_action()` and `animrig::unassign_action()`. These functions not only correctly handle user counts, but also ensure that slot assignments & user tracking works. The former always happens, the latter only when building with experimental features enabled. Because (un)assigning slotted Actions need the animated ID (instead of just the `AnimData *`), more functions now require an `OwnedAnimData`. Note that there is still some user count juggling. This is caused by `BKE_id_new()`, and by extension `BKE_action_add`, returning an ID with user count = 1, even though that ID is not yet used. A todo task #128017 has been made to change `BKE_action_add()` so that the Action it returns can be directly fed into `animrig::assign_action()`. This PR updates the following areas: - Creating a node group by grouping animated nodes, as this has to move the animation data. This PR just handles the assignment of a new Action. - Temporary Action creation for ungrouping node groups. - Versioning of pre-2.5 animation data. No functional changes. Ref: #123424 Pull Request: https://projects.blender.org/blender/blender/pulls/128026
105 lines
1.9 KiB
CMake
105 lines
1.9 KiB
CMake
# SPDX-FileCopyrightText: 2023 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
set(INC
|
|
../include
|
|
../io
|
|
../../asset_system
|
|
../../blenkernel
|
|
../../blenloader
|
|
../../blentranslation
|
|
../../compositor
|
|
../../compositor/realtime_compositor
|
|
../../draw
|
|
../../functions
|
|
../../geometry
|
|
../../gpu
|
|
../../imbuf
|
|
../../makesrna
|
|
../../nodes
|
|
../../render
|
|
../../windowmanager
|
|
|
|
# RNA_prototypes.hh
|
|
${CMAKE_BINARY_DIR}/source/blender/makesrna
|
|
)
|
|
|
|
set(INC_SYS
|
|
)
|
|
|
|
set(SRC
|
|
add_menu_assets.cc
|
|
clipboard.cc
|
|
drawnode.cc
|
|
link_drag_search.cc
|
|
node_add.cc
|
|
node_context_path.cc
|
|
node_draw.cc
|
|
node_edit.cc
|
|
node_geometry_attribute_search.cc
|
|
node_gizmo.cc
|
|
node_group.cc
|
|
node_ops.cc
|
|
node_relationships.cc
|
|
node_select.cc
|
|
node_shader_preview.cc
|
|
node_templates.cc
|
|
node_view.cc
|
|
space_node.cc
|
|
|
|
node_intern.hh
|
|
)
|
|
|
|
set(LIB
|
|
PRIVATE bf::animrig
|
|
PRIVATE bf::blenfont
|
|
bf_blenkernel
|
|
PRIVATE bf::blenlib
|
|
PRIVATE bf::depsgraph
|
|
PRIVATE bf::dna
|
|
bf_editor_screen
|
|
PRIVATE bf::intern::guardedalloc
|
|
bf_realtime_compositor
|
|
PRIVATE bf::extern::fmtlib
|
|
)
|
|
|
|
if(WITH_COMPOSITOR_CPU)
|
|
add_definitions(-DWITH_COMPOSITOR_CPU)
|
|
endif()
|
|
|
|
if(WITH_OPENIMAGEDENOISE)
|
|
add_definitions(-DWITH_OPENIMAGEDENOISE)
|
|
endif()
|
|
|
|
if(WITH_OPENSUBDIV)
|
|
add_definitions(-DWITH_OPENSUBDIV)
|
|
endif()
|
|
|
|
if(WITH_OPENVDB)
|
|
list(APPEND INC
|
|
../../../../intern/openvdb
|
|
)
|
|
list(APPEND INC_SYS
|
|
${OPENVDB_INCLUDE_DIRS}
|
|
)
|
|
list(APPEND LIB
|
|
bf_intern_openvdb
|
|
${OPENVDB_LIBRARIES}
|
|
)
|
|
add_definitions(-DWITH_OPENVDB ${OPENVDB_DEFINITIONS})
|
|
endif()
|
|
|
|
if(WITH_TBB)
|
|
if(WIN32)
|
|
# TBB includes `Windows.h` which will define min/max macros
|
|
# that will collide with the STL versions.
|
|
add_definitions(-DNOMINMAX)
|
|
endif()
|
|
endif()
|
|
|
|
blender_add_lib(bf_editor_space_node "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
|
|
|
# RNA_prototypes.hh dna_type_offsets.h
|
|
add_dependencies(bf_editor_space_node bf_rna)
|