Fix T80391: Overrides: wrong check in constraint poll

Condition was flipped, would allow actions on constraints coming from
library, but prevented actions on local constraints.

Mistake in rBS0b49fdd0ee0.

Maniphest Tasks: T80391

Differential Revision: https://developer.blender.org/D8793
This commit is contained in:
Philipp Oeser 2020-09-03 11:27:45 +02:00
parent 09f966ad16
commit a04ac5b52d
Notes: blender-bot 2023-02-13 21:17:58 +01:00
Referenced by issue #80391, library override: you can add object constraint but than you cant delete it
1 changed files with 1 additions and 1 deletions

View File

@ -682,7 +682,7 @@ static bool edit_constraint_poll_generic(bContext *C,
}
if (ID_IS_OVERRIDE_LIBRARY(ob) && !is_liboverride_allowed) {
if ((con == NULL) || (con->flag & CONSTRAINT_OVERRIDE_LIBRARY_LOCAL) != 0) {
if ((con == NULL) || (con->flag & CONSTRAINT_OVERRIDE_LIBRARY_LOCAL) == 0) {
CTX_wm_operator_poll_msg_set(C, "Cannot edit constraints coming from library override");
return false;
}