Revert "Fix crash running constraint, modifier, fx from missing NULL check"
This reverts commit f4d5a69cf8
.
This causes bpy.ops.object.modifier_apply.poll() to fail as
well as modifier binding operators (breaking tests).
This commit is contained in:
parent
a58a8296d9
commit
99eca899c0
|
@ -706,11 +706,6 @@ static bool edit_constraint_poll_generic(bContext *C,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!con) {
|
||||
CTX_wm_operator_poll_msg_set(C, "Context missing active constraint");
|
||||
return false;
|
||||
}
|
||||
|
||||
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");
|
||||
|
|
|
@ -443,10 +443,6 @@ static bool gpencil_edit_modifier_poll_generic(bContext *C,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!mod) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_liboverride_allowed && BKE_gpencil_modifier_is_nonlocal_in_liboverride(ob, mod)) {
|
||||
CTX_wm_operator_poll_msg_set(
|
||||
C, "Cannot edit modifiers coming from linked data in a library override");
|
||||
|
|
|
@ -1051,10 +1051,6 @@ bool edit_modifier_poll_generic(bContext *C,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!mod) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_liboverride_allowed && BKE_modifier_is_nonlocal_in_liboverride(ob, mod)) {
|
||||
CTX_wm_operator_poll_msg_set(
|
||||
C, "Cannot edit modifiers coming from linked data in a library override");
|
||||
|
|
|
@ -368,12 +368,8 @@ static bool edit_shaderfx_poll_generic(bContext *C, StructRNA *rna_type, int obt
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!fx) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ID_IS_OVERRIDE_LIBRARY(ob)) {
|
||||
if ((fx->flag & eShaderFxFlag_OverrideLibrary_Local) == 0) {
|
||||
if ((fx == NULL) || (fx->flag & eShaderFxFlag_OverrideLibrary_Local) == 0) {
|
||||
CTX_wm_operator_poll_msg_set(C, "Cannot edit shaderfxs coming from library override");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue