From 83e245023c481aa2f57588724915e554c00c05d2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 19 Nov 2021 11:48:25 +0100 Subject: Fix (unreported) wrong behavior of constraints in liboverrides. All constraints were 'made local', including the ones comming from the reference linked object. --- source/blender/blenkernel/intern/constraint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 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 b2b03d28483..7ddbaa0e9ee 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -6022,7 +6022,6 @@ bConstraint *BKE_constraint_duplicate_ex(bConstraint *src, const int flag, const bConstraint *dst = MEM_dupallocN(src); constraint_copy_data_ex(dst, src, flag, do_extern); dst->next = dst->prev = NULL; - dst->flag |= CONSTRAINT_OVERRIDE_LIBRARY_LOCAL; return dst; } @@ -6057,7 +6056,9 @@ void BKE_constraints_copy_ex(ListBase *dst, const ListBase *src, const int flag, for (con = dst->first, srccon = src->first; con && srccon; srccon = srccon->next, con = con->next) { constraint_copy_data_ex(con, srccon, flag, do_extern); - con->flag |= CONSTRAINT_OVERRIDE_LIBRARY_LOCAL; + if ((flag & LIB_ID_COPY_NO_LIB_OVERRIDE_LOCAL_DATA_FLAG) == 0) { + con->flag |= CONSTRAINT_OVERRIDE_LIBRARY_LOCAL; + } } } -- cgit v1.2.3