Global guide selection

Hi there,

Is there a way to get the selection state of a global guideline? At present I’m collecting the guidelines from the associatedFontMasterId, but even when selected in the edit view (guide).selected always returns False for globals. Works as expected for local guides though. It also returns False when not checking the selected state via iteration.

I’d like to be able to select a guide to then run a plugin function from a context menu.

Any direction would be great, Thanks!



if guide in Layer.selection:

Perfect, that works as expected.

Thanks Georg

If you need to check the selection state a lot, use that method. You even can enumerat the selection directly.

1 Like