Remove context check from constraint and shaderfx edit poll

This mirrors 1f78e86070 from 2018 for mesh modifiers.

Differential Revision: https://developer.blender.org/D7940
This commit is contained in:
2020-06-05 14:30:15 -04:00
parent 70ad18b94d
commit 2ee95e91f7
2 changed files with 0 additions and 10 deletions

View File

@@ -668,11 +668,6 @@ static bool edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", rna_type);
Object *ob = (ptr.owner_id) ? (Object *)ptr.owner_id : ED_object_active_context(C);
if (!ptr.data) {
CTX_wm_operator_poll_msg_set(C, "Context missing 'constraint'");
return 0;
}
if (!ob) {
CTX_wm_operator_poll_msg_set(C, "Context missing active object");
return 0;

View File

@@ -296,11 +296,6 @@ static bool edit_shaderfx_poll_generic(bContext *C, StructRNA *rna_type, int obt
PointerRNA ptr = CTX_data_pointer_get_type(C, "shaderfx", rna_type);
Object *ob = (ptr.owner_id) ? (Object *)ptr.owner_id : ED_object_active_context(C);
if (!ptr.data) {
CTX_wm_operator_poll_msg_set(C, "Context missing 'shaderfx'");
return 0;
}
if (!ob || ID_IS_LINKED(ob)) {
return 0;
}