Hi! I’m trying to get the selected visible keyframes in a Graph Editor from a 3D Viewport. If I try context.selected_visible_fcurves
in the 3D Viewport, it returns None, but in the Graph Editor it works.
I’m currently doing this:
previous_area_type = context.area.type
context.area.type = 'GRAPH_EDITOR'
fcurves = context.selected_visible_fcurves
context.area.type = previous_area_type
Is there a better way?
Thank you!