WHAT THIS MEL SCRIPT DOES
Maya allows you to select and snap verts to the grid, but only one at a time or as groups relative to one pivot point. This tool allows you to snap all selected verts of a mesh (or multiple) to your grid in 3D space at once. You can select entire objects, as well as individual faces, edges, or groups of verts at a time and snap their verts to the nearest grid position. You can do this on all axis at once, or specifically snap just in the XYZ directions if needed. This can be useful if you're using the grid for pixel-perfect UVing, or need to precisely align many verts to a grid all at once.
SETUP
Note: This MEL script was made and tested on Maya 2023.1. It may or may not work in earlier or later versions. I am also unsure if it's guaranteed to work in Maya LT, but I made it in MEL instead of Python for that specific reason so fingers crossed!
HOW TO USE
Video demo on ArtStation blog post ↗️
Input current grid settings (found in 'Display > Grid'), select the object(s), individual face(s), vert(s), or edge(s), then hit the corresponding button to snap your verts to the nearest grid position along the specified axis.
That's it! Hope it helps!