instanceInterpolations for special layers?

Hi! Is there a way to get instanceInterpolations for layers rather than masters? Ignoring special layers’ influence doesn’t seem right, does it?

Can you describe your exact problem?

The request des not make sense to me. How would you interpolate between ‘not masters’?

I mean, bracket/brace layers are not ‘masters’ but they are involved in interpolation of a certain glyph in the same way as masters, right? instanceInterpolation doesn’t seem take them into account, if I’m not mistaken.

I’m trying to visualize the designspace including masters influence, but it doesn’t make complete sense without the special layers.

For glyphs with brace layers, Glyphs sets up a new instance and computes a local instanceInterpolation. There is not way to access that from a script.
What are you trying to do?

Just visualizing the designspace, something like this. Black squares are masters, empty squares are brace layers and the dot is an instance showing what masters influence it (yep, that’s a big setup).

Is there a way to just replicate the calculation of local instanceInterpolation knowing the layers and instance location?

What do you like to know that?
Internally, Glyphs sets up a new list of masters (of the actual masters and the brace layers). This code might help:

newMasters = Layer.parent._collectBraceLayerIDsMasters_(Layer.font().fontMasters())
instance = Layer.font().instances[2].copy()
interpolation = instance.instanceInterpolations_(newMasters)
1 Like

Perfect, thanks a lot!