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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user