From 682ccd770c629402b771491d45a0523f75750f30 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 8 Dec 2020 09:40:42 +0100 Subject: LibOverride: Refactor collection items 'local' helper functions. It's easier to read and less 'weird' to check that an item is non-local in a liboverride data-block, than the other way around. Thanks to @sybren for noticing it. --- source/blender/blenkernel/intern/constraint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/constraint.c') diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 982e91dd1e0..d9135572159 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -5963,10 +5963,10 @@ static bConstraint *constraint_find_original_for_update(bConstraintOb *cob, bCon * * \note This check is only valid for a liboverride data-block, it always return \a true otherwise. */ -bool BKE_constraint_is_local_in_liboverride(const Object *ob, const bConstraint *con) +bool BKE_constraint_is_nonlocal_in_liboverride(const Object *ob, const bConstraint *con) { - return (!ID_IS_OVERRIDE_LIBRARY(ob) || - (con != NULL && (con->flag & CONSTRAINT_OVERRIDE_LIBRARY_LOCAL) != 0)); + return (ID_IS_OVERRIDE_LIBRARY(ob) && + (con == NULL || (con->flag & CONSTRAINT_OVERRIDE_LIBRARY_LOCAL) == 0)); } /* -------- Constraints and Proxies ------- */ -- cgit v1.2.3