WIP: Brush assets project #106303

Draft
Julian Eisel wants to merge 352 commits from brush-assets-project into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 9 additions and 1 deletions
Showing only changes of commit e9588e5175 - Show all commits

View File

@ -980,7 +980,15 @@ Main *BKE_main_from_id(Main *global_main, const ID *id, const bool verify)
}
else {
/* Debug assert, especially for places that pass in G_MAIN. */
BLI_assert(BLI_findindex(which_libbase(global_main, GS(id->name)), id) != -1);
#ifndef NDEBUG
if (id->flag & LIB_EMBEDDED_DATA) {
const ID *id_owner = BKE_id_owner_get(const_cast<ID*>(id));
BLI_assert(BLI_findindex(which_libbase(global_main, GS(id_owner->name)), id_owner) != -1);
}
else {
BLI_assert(BLI_findindex(which_libbase(global_main, GS(id->name)), id) != -1);
}
#endif
}
return global_main;