diff options
author | Bastien Montagne <bastien@blender.org> | 2020-12-08 11:40:42 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-12-08 11:40:42 +0300 |
commit | 682ccd770c629402b771491d45a0523f75750f30 (patch) | |
tree | fb37b6966691426464e7dd01f1e5b2372895974b /source/blender/editors/object/object_constraint.c | |
parent | 5f1a155a5ef39a4db144b38a607c19b763f965a3 (diff) |
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.
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index e684ad03f53..dd015f59e8d 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -706,8 +706,9 @@ static bool edit_constraint_poll_generic(bContext *C, return false; } - if (!is_liboverride_allowed && !BKE_constraint_is_local_in_liboverride(ob, con)) { - CTX_wm_operator_poll_msg_set(C, "Cannot edit constraints coming from library override"); + if (!is_liboverride_allowed && BKE_constraint_is_nonlocal_in_liboverride(ob, con)) { + CTX_wm_operator_poll_msg_set( + C, "Cannot edit constraints coming from linked data in a library override"); return false; } |