[addon] Utilities

https://raw.githubusercontent.com/ChrisRaven/FlyWire-Utilities/main/Utilities.user.js

In this addon I will put all smaller functionalities, which don’t need a separate addon.

In current version (0.1) the are 3 functionalities:

  1. Right-click on segment id (the coloured bar win number in the right panel) to jump to that segment (thanks @annkri for the idea).
  2. In the Dock panel (visible after clicking the “Addons” link in the left panel) there’s a button called “Jump to start”, that will move you to the point, at which you were right after claiming a new cell).
  3. Right-click on a segment’s checkbox to hide all segments but this one (thanks @AzureJay for the idea). It also shows the clicked segment if it was hidden, so you can basically jump between segments by right-clicking on their checkboxes.

The first thing took me much longer, than I thought, because I had trouble finding a way to associate cords with segments, but I was finally able to do it.
When you claim a new cell, its starting position will be its jumping point. When you split a segment, one of the sources will be a jumping point for one of the resulting segments, and one of the sinks will be a jumping point for the other new segment. When you merge two segments, new jumping point will be one of the jumping points the merged segments had.
It will work only for segments that you either claimed or right-clicked (in the 2D panel) to existense, so it won’t work on segments, if you open a cell from a link. If you’d like to add those segments to the tracking list, you’d have to double-click on each segment to hide it and then double-click again to show it (both in the 2D panel). The double-clicking is needed, because this is the moment, when I gather coordinates for given segment.
The tracking list is cleared each time you claim a new cell, so if you’re working in two browser tabs and have fragments tracked in both of them, both segments’ groups will be untracked, when you claim a new cell in any of the tabs.
Sometimes there might be small delay (up to hundreds of milliseconds) between right-clicking and jumping. It’s because the script might be updating root ID from the server for a given segment.

Enjoy :slight_smile:

5 Likes

These are great additions! I bet I’ll find myself using these a bunch.

Suggestions:

  • A way to rename segments (pretty much replace the ID with a custom name), that could help for large cells to keep track of things.
  • As an extension to 2, automatically adding an annotation at the start point after claiming a new cell
5 Likes

Thanks for the ideas, both sound doable.

3 Likes

Thanks so much, excited to get to use these. :slight_smile:

Suggestion: A ‘bookmark’ type feature to save the current state (via the share link).

  • “Save Bookmark” would get the current ‘Share’ link, and save it locally
  • “Load Bookmark” would get the saved ‘Share’ link and load it

I’m still using off FW notes to save in-progress cells and I’d love to be able to just do that from the FW app itself.

6 Likes

Ooo, another great idea! Adding to my TODO list :slight_smile:

6 Likes

is there a way im unaware of of clicking on a segment in segment selection in rendering layer and instead of the segment being unselected it ‘jumps’ me to that segment? Sometimes I have something like this:


only with 10+ segments and i’d love if i could somehow click or double click on the segment in that list and it jumps me straight to that segment, as is now I have to look in 3D which isn’t always optimal (espec. when dealing w a large cell like this one).

With the addon from this thread installed you can rightclick a segment to jump to it. See the opening post for more info.

2 Likes

oh the right click jump to segment is amazing! thnx!

2 Likes

v. 0.2.0.1

Added two buttons: 1px and 5px.
They allow quick switching between two most commonly used resolutions (only ones useful?).
The buttons change the resolution both in the Image tab and the Graph Segmentation tab.
I made it instead of changing the bars to sliders, but maybe in the future I’ll still do it.

Edit: And only now I’ve realized, that the update link still doesn’t work automatically. I made the necessary fixes and now it should work ok. You have to install this version manually and from now on, it should update itself automatically. The link for the update is the same as the one at the beginning of the topic:
https://raw.githubusercontent.com/ChrisRaven/FlyWire-Utilities/main/Utilities.user.js

3 Likes

v. 0.3

Now you can Ctrl + right-click to deselect a point during multicut.

4 Likes

v. 0.4

Added an option named “Add point at start”. If checked, everytime you claim a new cell, an annotation called “START” will be created at the starting point. Thanks @bl4ckscor3 for the idea :slight_smile: . The annotation will be removed, when you claim a next cell (and a new one will be created for that cell).

The name contains “point” instead of “annotation”, because the latter was much to long, lol.

Please, keep in mind, that some things may not work correctly. I wasn’t able to test this feature thoroughly, because I had to claim a new cell each time, I’ve made some corrections. Because of that, I now have about 8 cells claimed (have links to all of them) in my backlog :smiley:

Btw. I’m planning to add an options panel for this addon, so you’ll be able to choose, which elements of the addon you want to have displayed in the Dock.

6 Likes

nice feature, would is also be possible to remove all previous annotations at the same time, so you start with a clean sheet or if that is not possible, add a new annotation layer with the start annotation, so you can manually remove the old layers.

3 Likes

It’s definitely possible (now, that I, more or less, know, how annotations work). I can remove all annotations in a given tab, in all tabs, or close and reopen tab(s) to remove them. I can do it, however you’d like.
Not sure, if I should add an option for this or make it standard behaviour - I don’t know, if there’s any reason to keep annotations from an old cell to a new cell.

4 Likes

For now, you can click on the topmost annotation, then scroll down, and hold your SHIFT key while clicking on the bottommost annotation. That should mark all annotations inbetween as well, and you can remove all with one single press of the trash can.

2 Likes

Personally i am not seeing any reason why we should need old annotations, unless someone wish to use a annotation tab with starting points to have a record of the cells that have been done. so maybe a option is good?

i am thinking that closing+ reopening might be the most economic way to do it, instead of individual request for each point? all tabs would be my prefered choice.

2 Likes

Ok, cool. I’ll do it that way.
As for remembering old, already done cells, Amy said yesterday something about a history of cells built in in the future. I was also thinking about doing such thing (maybe together with a Bookmarks addon I’m planning to do). But, yeah, I’ll do it as an option, just in case.

1 Like

v. 0.5

Added an option to remove all old annotations, when a new cell has been claimed (it closes all the annotation tabs).

Added an “Option” button. After clicking it, you’ll see list of all available features. By checking or unchecking the checkboxes you can show or hide these features from the Utilities addon. Warning: even if a feature is hidden, it will still work, so if you don’t want to use a feature, first disable it and then hide it. It’s made this way, because some might want to turn on a feature and just hide it from the interface to reduce clogging.

P.S. Some settings from the previous version of the addon might be removed, so you’ll probably have to re-set them. Sorry :slight_smile:

Edit:
There were some whitespace issues. I fixed them in v. 0.5.1.

4 Likes

v. 0.6

When the “Remove points at start” is checked, now it removes not only old annotations, but also old multicut points and paths.

You can now Ctrl+right click on an annotation (in 2D and in 3D) to remove that annotation. Removing them in 3D can sometimes be tricky (you have to hit it first, lol).

Lastly selected resolution button will now be highlighed (have yellow border). Small caveat here - if you manually change the resolution (via the bars thingy), a button will still be highlighted. In other words, the highlight will just show, which of the two buttons was clicked last, not necessarily the current resolution. It’s done like that, so you’ll still be able to manually change the resolution (maybe different than those two) and stick to it.

2 Likes

v. 0.7

Now you can also delete multicut points in 3D with ctrl+right-click.
I was able to prevent the right-clicking on a point to switch to the Annotations tab in the right-side panel, but, I believe, it isn’t a very big issue.

3 Likes

My annotation layer suddenly disappear while tracing. have happened several times today and maybe also yesterday without me connecting it. No idea what i am doing for that to happen, but have to be something on the keyboard, beacuse i am pretty sure i am not pressing the red cross with mouse. Could it be a bug with some of the latest script updates?

1 Like