I'm looking for a way to be sure a script affect only f-curves that are showing up to the user in the graph editor (post filtering) for WYSIWYG style control.
In details: Currently I'm getting the actions from the objects directly after checking the properties of the graph editor (check if "show_only_selected" is on for exemple) in the graph editor, then try to get related actions from selected objects.
Problem is : With the filter show_only_selected toggled On in graph editor, In the case of armature selected, if some of it's bones are unselected there are hided in editor but still affected by the script (I get all the fcurves of the actions). Other animated properties might be affected while being invisible to the user or on the contrary being not affected while being visible.
A way to directly iterate on filtered f-curves would be really nice (if not necessary) to apply some script on what the user see/isolate.
Even more details in this blender artist thread :