Exporting from Glyphs instances and masters to UFOs

Hi there, I am wondering if there is a way or a code to export from Glyphs all instances and masters into UFOs? Currently I have 3 masters and 5 more instances but I have no clue how to do it. If I make the instances into masters some problems occur.

Why do you want to export your instances as UFOs?

You can export your masters as UFOs using File > Export > UFO.

Because the final files I have to deliver have to be for Robofont and they require the masters, as well as the instances.

What do you mean by “the instances”? Just the data containing the axis coordinates at which the instances are? Look into .designspace files.

Take a look at this script: font-scripts/Export UFO and designspace files.py at master · jpt/font-scripts · GitHub