Yes, that topic again... the last one devolved into a discussion on GetBranchInfo(), which was broken at that time but meanwhile works fine.
So: If I have an object somewhere (BaseList2D, I guess), which has a track, how can I make it appear in a timeline?
I tried the NBIT_TLxxx flags, which control the selection/folding state and allow me to hide an object, but there is no flag that determines that the object is in the timeline at all.
Essentially, I want to replicate the functionality of the context menu entry "Show Tracks"/"Show FCurve". What's the true code behind those?
The determining factor seems to be somewhere hidden. If I use "Show Tracks" on all objects/tags in the scene, then I can NBIT_TLxxx_HIDE the unwanted objects afterwards, but it doesn't seem to be possible to get to this initial visibility state in the first place (and also, any further use of "Show Tracks" restricts this visibility again to the selected objects).
Out of desperation, I may use the BranchInfo flags next, but I have no hope that I am even close to the solution.
Clarification: I am not looking for the iteration of objects, for the selection, or for the folding. Just for the method that will show the object/the track in timeline xxx.