Focus on Selected Paths (scripting)

Focus on Selected Paths function is amazing.
It’s very useful during CJK typeface design, since there’re always lot of paths in one glyph.

Just because there’re always too many paths in one glyph in Han character works, I’m trying to write a SelectTool plug-in to select paths quickly.
I want to add Focus on Selected Paths function to context menu, but how can I call it by script?

And then, when I focus on some paths and switch to my own SelectTool, all paths will get focus again. I found the below post, so the issue will be fixed in next version, right?

cmd+A still select all paths in focus mode, is this feature or bug?

To “hide” a path:

path = Layer.shapes[2]
path.setTempData_forKey_(True, "GSUnfocus")
Glyphs.redraw()

It seems like a bug. Or do you like it like that :wink:

To “hide” a path:

Thanks a lot.
Unfoucused paths will keep unfocus when tool be changed in next version, right?

It seems like a bug. Or do you like it like that :wink:

No. :slight_smile:
and drag on unfoucus paths, they can still be adjusted, please check it.

I forget to ask that, ‘Focus on Selected Paths’ (and cancel it) seems not included in function list. I can’t assign hot keys for it.

What do you mean?

I added it.

What do you mean?

Now, ’ Focus on Selected Paths’ only works in Select tool now.
When switch to other tools, like Knife or my own SelectTool plugin,
all unfocused paths will get focus again.

And I hope the ‘focus status’ can be kept during tool changed.

Will this feature be modified, or what I need to do in my SelectTool plugin?

The other tools need to be updated. I’ll have a look. The focus state should still be there if you switch back to the select tool.

The focus state should still be there if you switch back to the select tool.

Yes.

I’m writing a SelectTool plugin now.
In planned scenario, user may (1) select some paths by the SelectTool plugin. → (2) pop up context menu and click ‘focus on selected paths’ → (3) switch to standard select tool to edit detail.
And focus status get gone at step 3 in current spec.

okay, maybe I will try another scenario. :slight_smile:

I don’t understand what the new tool should accomplish.