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/gpencil_modifier.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel/intern/gpencil_modifier.c') diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c index 7425a1a5f7a..ac81e4a5470 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier.c +++ b/source/blender/blenkernel/intern/gpencil_modifier.c @@ -531,16 +531,16 @@ void BKE_gpencil_modifier_set_error(GpencilModifierData *md, const char *_format } /** - * Check whether given modifier is local when the object is a library override. + * Check whether given modifier is not local (i.e. from linked data) when the object is a library + * override. * * \param gmd May be NULL, in which case we consider it as a non-local modifier case. - * - * \note This check is only valid for a liboverride data-block, it always return \a true otherwise. */ -bool BKE_gpencil_modifier_is_local_in_liboverride(const Object *ob, const GpencilModifierData *gmd) +bool BKE_gpencil_modifier_is_nonlocal_in_liboverride(const Object *ob, + const GpencilModifierData *gmd) { - return (!ID_IS_OVERRIDE_LIBRARY(ob) || - (gmd != NULL && (gmd->flag & eGpencilModifierFlag_OverrideLibrary_Local) != 0)); + return (ID_IS_OVERRIDE_LIBRARY(ob) && + (gmd == NULL || (gmd->flag & eGpencilModifierFlag_OverrideLibrary_Local) == 0)); } /** -- cgit v1.2.3