# Noder Editor Tools
## Motivation
Compared to other areas of Blender active tools are very underused in the node editor.
More active tools have some benefits:
* **Improve workflows without mouse and keyboard**
* **Better Discoverability**
Some functionality like the gesture tool are great but can be hard to find. Having them exposed prominently in the UI as tools could help with that.
* **General Workflow**
Some parts of node editing like arranging and documenting node trees could benefit from having tools that allow executing the same functionality over and over again, e.g. coloring nodes
## Ideas
The following ideas are implemented in the "Node Editor Tools" extension.
### Mute Links
Same as the existing "Links Cut" tool but for the "Mute Links" gesture.

### Add Reroute
Same as the existing "Links Cut" tool but for the "Add Reroute" gesture.

### Add Frame

Add frames around nodes.
##### Functionality
* **Add Frame**
**`Left-Drag`:** Box-select several nodes and join them in a new frame. When no node is selected, an empty frame is added at the cursor.
* **Remove Frame**
**`ctrl`+`Left-Drag`:** Box-select several frames to quickly remove them.
* **Pick Node Color**
**`alt` + `Left-Click`:** Pick the color of the node under the cursor.
* **Pick Node Label**
**`shift` + `Left-Click`:** Pick the color of the node under the cursor.
##### Options
The options are found in the "Tools" panel in the sidebar of the node editor.
* **Label:** The label oof the added frame.
* **Custom Color:** Use a user defined color for the added frame.
* **Color:** The color to assign to the added frame. Only affects the frame, when "Custom Color" is checked.
:::info
**Note**
When no node is selected it'd be nice if the frame would match the size of the selection rectangle, so that it feels like on is "drawing" the frame.
:::
### Label Node

Select nodes by dragging or clicking to change their label.
##### Functionality:
* **Set Label**
**`Left-Click`:** Selects the node under the cursor and opens a pop-up to set the label.
**`Left-Drag`:** Box-select several nodes and set their label.
* **Clear Label**
**`ctrl` + `Left-Click`:** Select the node under the cursor and clear its label.
**`ctrl` + `Left-Drag`:** Box-select several nodes and clear their label.
* **Pick Label**
**`alt` + `Left-Click`:** Pick the label of the node under the cursor.
:::info
**Note**
I think the tool might be fine with just the basic `Left-Click` functionality.
:::
##### Options
The options are found in the "Tools" panel in the sidebar of the node editor.
* **Color:** The color to assign to the nodes.
* **Frames Only:** Only set the color of frame nodes.
* **Children:** Also set the color of the child nodes of selected frames.
### Edit Frame Text

Click on a frame node to add or edit the contained comment.
:::warning
**Note**
This is more of a prototype. It uses a hacky way to spawn a new window with a text editor that allows to edit the frames text data-block more conveniently.
:::
### Color Nodes

Select nodes by dragging or clicking to change their color.
##### Functionality:
* **Set Color**
**`Left-Click`:** Selects the node under the cursor and sets its color.
**`Left-Drag`:** Box-select several nodes and set their color.
* **Clear Color**
**`ctrl` + `Left-Click`:** Select the node under the cursor and clear its color.
**`ctrl` + `Left-Drag`:** Box-select several nodes and clear their color.
* **Pick Node Color**
**`alt` + `Left-Click`:** Pick the color of the node under the cursor.
##### Options
The options are found in the "Tools" panel in the sidebar of the node editor.
* **Color:** The color to assign to the nodes.
* **Frames Only:** Only set the color of frame nodes.
* **Children:** Also set the color of the child nodes of selected frames.