From ceea3d0f809b0579eb634fc5206a678d996327f6 Mon Sep 17 00:00:00 2001 From: Sayed Amin Date: Fri, 18 Feb 2022 16:23:22 +0100 Subject: Fix T95135: improve error filtering non-existant anim data If there is no animation at all, or it's all hidden, the Euler Filter operators poll now fails with a message that explains this a bit more, instead of just the generic "context is wrong" error. Reviewed By: sybren Maniphest Tasks: T95135 Differential Revision: https://developer.blender.org/D13967 --- source/blender/editors/space_graph/graph_utils.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source') diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index 4351186dc6f..9f934e47ebb 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -185,6 +185,7 @@ bool graphop_editable_keyframes_poll(bContext *C) filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVE_VISIBLE); items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); if (items == 0) { + CTX_wm_operator_poll_msg_set(C, "There is no animation data to operate on"); return found; } -- cgit v1.2.3