LibOverride: Fix broken logic in code checking and adding new override ops.

When we wanted to force all overidable IDs to be checked, code would end
up checking the whole Main DB, instead of only overrideable ones.
This commit is contained in:
Bastien Montagne
2019-08-22 14:28:31 +02:00
parent 08ab3cbcce
commit df5237ec5e

View File

@@ -628,7 +628,7 @@ void BKE_main_override_library_operations_create(Main *bmain, const bool force_a
ID *id;
FOREACH_MAIN_ID_BEGIN (bmain, id) {
if (force_auto ||
if ((ID_IS_OVERRIDE_LIBRARY(id) && force_auto) ||
(ID_IS_OVERRIDE_LIBRARY_AUTO(id) && (id->tag & LIB_TAG_OVERRIDE_LIBRARY_AUTOREFRESH))) {
BKE_override_library_operations_create(bmain, id, force_auto);
id->tag &= ~LIB_TAG_OVERRIDE_LIBRARY_AUTOREFRESH;