Restyle across frames

I have an animated plot, originally constructed with plotly python, with hundreds of scatter traces, each of which moves around over the course of a few frames. To make it a bit easier on the eyes, I have all of the traces start out with opacity=0.3. I’m trying to add a feature where if I click on one of the traces, all of the other traces become visible=‘legendonly’ and the clicked trace gets opacity=1. I have this working using a plotly_click handler that calls Plotly.restyle. The problem is that if I then switch to a different frame, the visibility change persists, but the opacity of the visible trace returns to 0.3.

I don’t see any way to call restyle on the other frames without first animating to each of them, which seems extremely janky.

The one thing I’ve figured out that does work is, after calling restyle, update the opacity for the relevant traces inside graphDiv._transitionData._frames[f].data (for all f) and then call Plotly.addFrames(graphDiv, graphDiv._transitionData._frames). I don’t love this, since it relies on undocumented implementation details. Is there an official way to grab the data for the frames that are not currently shown?