I'm looking to create some node alignment scripts (Align Vertical, Align Horizontal), and to do that, I believe I'll need the following information:
- Current Node Editor + View Context (asked in a separate post)
- Selected Nodes within the Currently Active Node Editor + Context
- Node Position (Along with information on where the axis is relative to the node)
- Node Width/Height (So that I can calculate bounds and add even gaps between nodes)
- Node Editor Bounds (What's visible min/max)
- Grid spacing + positioning
- Nearest Grid Point (for snapping to grid if Snap to Grid is on/active)
- Node position (ideally w/ option to snap to the nearest grid point)
- Node Editor Bounds / Zoom + Pos
Which (if any) of the above methods currently exist?
I'll edit this post if my own research turns up anything useful.