Fix issues in ID usages checks - we are not interested in self-usages here.
Drivers or constraints referencing self object could break deletion of proxy objects (due to their ambiguous, half-local, half-linked status).
This commit is contained in:
parent
01e3141ce6
commit
b91aea6096
|
@ -1015,6 +1015,10 @@ static bool library_ID_is_used(Main *bmain, void *idv, const bool check_linked)
|
|||
}
|
||||
|
||||
for (; id_curr && !is_defined; id_curr = id_curr->next) {
|
||||
if (id_curr == id) {
|
||||
/* We are not interested in self-usages (mostly from drivers or bone constraints...). */
|
||||
continue;
|
||||
}
|
||||
iter.curr_id = id_curr;
|
||||
BKE_library_foreach_ID_link(
|
||||
id_curr, foreach_libblock_id_users_callback, &iter, IDWALK_NOP);
|
||||
|
@ -1063,6 +1067,10 @@ void BKE_library_ID_test_usages(Main *bmain, void *idv, bool *is_used_local, boo
|
|||
}
|
||||
|
||||
for (; id_curr && !is_defined; id_curr = id_curr->next) {
|
||||
if (id_curr == id) {
|
||||
/* We are not interested in self-usages (mostly from drivers or bone constraints...). */
|
||||
continue;
|
||||
}
|
||||
iter.curr_id = id_curr;
|
||||
BKE_library_foreach_ID_link(id_curr, foreach_libblock_id_users_callback, &iter, IDWALK_NOP);
|
||||
|
||||
|
|
Loading…
Reference in New Issue