[Bf-blender-cvs] [ceea3d0f809] master: Fix T95135: improve error filtering non-existant anim data
Sayed Amin
noreply at git.blender.org
Fri Feb 18 16:24:56 CET 2022
Commit: ceea3d0f809b0579eb634fc5206a678d996327f6
Author: Sayed Amin
Date: Fri Feb 18 16:23:22 2022 +0100
Branches: master
https://developer.blender.org/rBceea3d0f809b0579eb634fc5206a678d996327f6
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
===================================================================
M source/blender/editors/space_graph/graph_utils.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list