I always work with the grid enabled in my settings and align all my nodes to it. This makes the script tidy and easy to read. The only thing that used to drive me crazy was that backdrop edges don’t snap to this grid. The center snaps perfectly, but the borders just hang awkwardly between the grid lines. So, I wrote a script to partially fix this mess.
Once installed, a new menu item appears in the top menu: DB Tools/DB Backdrop, with two commands: Create new and Align to grid. The first one, surprisingly enough, creates a new backdrop around the selected nodes — or an empty one under your mouse cursor if nothing is selected. But unlike the default Nuke backdrop, its edges snap perfectly to the grid. The second command aligns one or more selected backdrops without affecting the nodes inside them. The borders are set strictly to even grid lines so that they don’t shift off the grid when you trigger Snap All to Grid.
The script pulls the grid size directly from the project settings. It also grabs the tile size to calculate proper padding when adding a backdrop around a group of nodes. The left and right paddings are identical, while the top padding is larger than the bottom one to leave room for the title.
By default, the hotkeys are set to Alt (Option) + B for a new backdrop and Alt (Option) + Shift + B to align existing ones. You can change them in included menu.py.
Download the script from my GitHub.