Fix mistake in recent change to liboverride cleanup of invalid operations.
Issue introduced by own 784d09a87c, would end up cleaning too many,
including valid liboverride operations.
This commit is contained in:
@@ -824,9 +824,16 @@ bool RNA_struct_override_matches(Main *bmain,
|
||||
op ? op->operations.first : nullptr);
|
||||
|
||||
if (op != nullptr) {
|
||||
/* Do not use #BKE_lib_override_library_operations_tag here, in collection case some of the
|
||||
* operations may still be unused. */
|
||||
op->tag &= ~LIBOVERRIDE_PROP_OP_TAG_UNUSED;
|
||||
/* Only set all operations from this property as used (via
|
||||
* #BKE_lib_override_library_operations_tag) if the property itself is still tagged as
|
||||
* unused.
|
||||
*
|
||||
* In case the property itself is already tagged as used, in means lower-level diffing code
|
||||
* took care of this property (as is needed for e.g. collections of items, since then some
|
||||
* operations may be valid, while others may need to be purged). */
|
||||
if (op->tag & LIBOVERRIDE_PROP_OP_TAG_UNUSED) {
|
||||
BKE_lib_override_library_operations_tag(op, LIBOVERRIDE_PROP_OP_TAG_UNUSED, false);
|
||||
}
|
||||
}
|
||||
|
||||
if ((do_restore || do_tag_for_restore) &&
|
||||
|
||||
Reference in New Issue
Block a user