Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSayed Amin <sayed_amin>2022-02-18 18:23:22 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-02-18 18:24:48 +0300
commitceea3d0f809b0579eb634fc5206a678d996327f6 (patch)
tree56a10eb9cefde7669ee6417e30f136d5abf87b58 /source/blender/editors/space_graph
parentaab15616908c770c40dcb0f5ba7903ee5ee895a5 (diff)
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
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_utils.c1
1 files changed, 1 insertions, 0 deletions
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;
}