diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index cb864334208..392ac68150e 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -897,10 +897,12 @@ void BKE_library_update_ID_link_user(ID *id_dst, ID *id_src, const int cd_flag) * This is a 'simplified' abstract version of #BKE_library_foreach_ID_link() above, quite useful to reduce * useless iterations in some cases. */ +/* XXX This has to be fully rethink, basing check on ID type is not really working anymore (and even worth once + * IDProps will support ID pointers), we'll have to do some quick checks on IDs themselves... */ bool BKE_library_idtype_can_use_idtype(const short id_type_owner, const short id_type_used) { - if (id_type_used == ID_AC) { - return id_type_can_have_animdata(id_type_owner); + if (id_type_can_have_animdata(id_type_owner)) { + return true; /* AnimationData can use virtually any kind of datablocks, through drivers especially. */ } switch ((ID_Type)id_type_owner) { @@ -999,10 +1001,10 @@ static int foreach_libblock_id_users_callback(void *user_data, ID *self_id, ID * IDUsersIter *iter = user_data; /* XXX This is actually some kind of hack... - * Issue is, only ID pointer from shapekeys is the 'from' one, which is not actually ID usage. + * Issue is, shapekeys' 'from' ID pointer is not actually ID usage. * Maybe we should even nuke it from BKE_library_foreach_ID_link, not 100% sure yet... */ - if (GS(self_id->name) == ID_KE) { + if ((GS(self_id->name) == ID_KE) && (((Key *)self_id)->from == *id_p)) { return IDWALK_RET_NOP; }