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
This commit is contained in:
parent
aab1561690
commit
ceea3d0f80
Notes:
blender-bot
2023-02-14 19:45:25 +01:00
Referenced by issue #95135, Wrong exception thrown when calling bpy.ops.graph.euler_filter() operator without keyframes
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue