Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-05-26 12:53:00 +0300
committerBastien Montagne <bastien@blender.org>2020-05-26 13:33:28 +0300
commit13b10ab852815861fad656a7ed4c07ffbd5a800c (patch)
tree490a0f2feb6be4e1ae78f9a007dd3cd09bc196a9 /source/blender/blenkernel/intern/lib_query.c
parent825d5c9992b2698d0e38cfec952593b0b15caa18 (diff)
Fix/refactor foreach_id handling of animdata.
Now callbacks for animdata, nla strip and fcurve are in their own proper BKE files (mimicking `foreach_id` callback of `IDTypeInfo`). This commit also fixes some missing handling of ID pointers (text ID and IDProperties of script fcurve modifier...).
Diffstat (limited to 'source/blender/blenkernel/intern/lib_query.c')
-rw-r--r--source/blender/blenkernel/intern/lib_query.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c
index dca3ea189a8..e425dae3022 100644
--- a/source/blender/blenkernel/intern/lib_query.c
+++ b/source/blender/blenkernel/intern/lib_query.c
@@ -183,39 +183,6 @@ void BKE_lib_query_idpropertiesForeachIDLink_callback(IDProperty *id_prop, void
BKE_LIB_FOREACHID_PROCESS_ID(data, id_prop->data.pointer, IDWALK_CB_USER);
}
-static void library_foreach_nla_strip(LibraryForeachIDData *data, NlaStrip *strip)
-{
- BKE_LIB_FOREACHID_PROCESS(data, strip->act, IDWALK_CB_USER);
-
- LISTBASE_FOREACH (NlaStrip *, substrip, &strip->strips) {
- library_foreach_nla_strip(data, substrip);
- }
-}
-
-static void library_foreach_animationData(LibraryForeachIDData *data, AnimData *adt)
-{
- LISTBASE_FOREACH (FCurve *, fcu, &adt->drivers) {
- ChannelDriver *driver = fcu->driver;
-
- LISTBASE_FOREACH (DriverVar *, dvar, &driver->variables) {
- /* only used targets */
- DRIVER_TARGETS_USED_LOOPER_BEGIN (dvar) {
- BKE_LIB_FOREACHID_PROCESS_ID(data, dtar->id, IDWALK_CB_NOP);
- }
- DRIVER_TARGETS_LOOPER_END;
- }
- }
-
- BKE_LIB_FOREACHID_PROCESS(data, adt->action, IDWALK_CB_USER);
- BKE_LIB_FOREACHID_PROCESS(data, adt->tmpact, IDWALK_CB_USER);
-
- LISTBASE_FOREACH (NlaTrack *, nla_track, &adt->nla_tracks) {
- LISTBASE_FOREACH (NlaStrip *, nla_strip, &nla_track->strips) {
- library_foreach_nla_strip(data, nla_strip);
- }
- }
-}
-
bool BKE_library_foreach_ID_embedded(LibraryForeachIDData *data, ID **id_pp)
{
/* Needed e.g. for callbacks handling relationships... This call shall be absolutely readonly. */
@@ -342,7 +309,7 @@ static void library_foreach_ID_link(Main *bmain,
AnimData *adt = BKE_animdata_from_id(id);
if (adt) {
- library_foreach_animationData(&data, adt);
+ BKE_animdata_foreach_id(adt, &data);
}
const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(id);