Obtain information if proxy is visible

I had the same problem. Maybe these will be helpful to someone.

  • This line will list only visible sources without triggering initialization.
[(n, s) for n, s in GetSources().items() if servermanager.GetRepresentation(s, v) is not None and GetDisplayProperties(s, view=v).Visibility==1]
  • This one will initialize and hide uninitialized sources:
[GetDisplayProperties(s, v).Visibility for s in GetSources().values()]

after which listing visible sources may be done without any problems

[(n[0], s, GetDisplayProperties(s, v).Visibility==1) for n, s in GetSources().items()]