LibOverride: Abstract a bit handling of local items of RNA collections.
RNA collections that support insertion of new items in liboverride data-block need a special way to distiguish between locale and orig-from-linked items (since some operations are allowed on the forer, but no the latter). In future we want a proper solution to abstract that at the `BKE_lib_override` level, but for now we need to add some code for each case. Note that this commit also fixes a few potential issues with GPencil modifiers, and constraints, regarding their handling of local overrides.
This commit is contained in:
@@ -1052,11 +1052,9 @@ bool edit_modifier_poll_generic(bContext *C,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ID_IS_OVERRIDE_LIBRARY(ob) && !is_liboverride_allowed) {
|
||||
if ((mod == NULL) || (mod->flag & eModifierFlag_OverrideLibrary_Local) == 0) {
|
||||
CTX_wm_operator_poll_msg_set(C, "Cannot edit modifiers coming from library override");
|
||||
return false;
|
||||
}
|
||||
if (!is_liboverride_allowed && !BKE_modifier_is_local_in_liboverride(ob, mod)) {
|
||||
CTX_wm_operator_poll_msg_set(C, "Cannot edit modifiers coming from library override");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_editmode_allowed && CTX_data_edit_object(C) != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user