How to control hidden/shown instances in preview menu

Hello, I am trying to find out how I can control the instances that are turned on or off in the preview window. See below:

How can I access this via a script? I couldn’t find anything about this on the API docs. Thank you!

Here is a small code to show only active Instances.
Use instance.visible to hide or show instances

#MenuTitle: Show Only Active Instances
# -*- coding: utf-8 -*-
Font = Glyphs.font

for instance in Font.instances:
	instance.visible =

Ah, that’s what it is. Wasn’t sure whether it’s controlled on Font level or in the instances, as userData or something with the EditViewController. Thanks a lot!

1 Like